Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github 无法访问存储库工作流文件中的组织机密_Github_Devops_Github Actions - Fatal编程技术网

Github 无法访问存储库工作流文件中的组织机密

Github 无法访问存储库工作流文件中的组织机密,github,devops,github-actions,Github,Devops,Github Actions,我已经在组织级别创建了有关kubernetes的机密,并且我选择了选择了存储库,并选择了存储库来授予访问机密的权限 这是我的工作流程文件 deploy_to_kubernetes_cluster: name: Deploy to Kubernetes Cluster needs: build_and_push_to_github_registry runs-on: ubuntu-latest steps: - name: Checkout Repo

我已经在组织级别创建了有关kubernetes的机密,并且我选择了
选择了存储库
,并选择了存储库来授予访问机密的权限

这是我的工作流程文件

  deploy_to_kubernetes_cluster:
    name: Deploy to Kubernetes Cluster
    needs: build_and_push_to_github_registry
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v2
      - name: Set Kubernetes Context
        uses: azure/k8s-set-context@v1
        with:
          method: service-account
          k8s-url: ${{ secrets.K8S_URL }} # Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
          k8s-secret: ${{ secrets.K8S_GITHUB_SERVICE_ACCOUNT_SECRET }}
      - name: Deploy to Cluster
        run: |
          sed -i'' -e 's/IMAGE_LABEL/${{ github.sha }}/g' deployment.yml
          kubectl apply -f deployment.yml
但我的错误率越来越低

Run azure/k8s-set-context@v1
  with:
    method: service-account
Error: Error: Input required and not supplied: k8s-url
我尝试在存储库级别创建机密,这很有效,但我在同一个组织下有许多存储库使用这些机密

如果我选择为每个存储库创建secret,那么管理它们将非常困难

我正在使用github free teir