【发布时间】:2020-05-30 00:59:47
【问题描述】:
在 Github Actions 中使用 git clone 时遇到一些问题,无论我尝试什么,都会得到以下结果:
我的 main.yml 中失败的代码:
jobs:
terraform:
name: 'Terraform with Github Actions!'
runs-on: ubuntu-latest
steps:
- name: 'Login to Azure'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Preparing blueprint-environment'
run: |
snip
git clone git@github.com:ourcompany/whateverrepo.git
错误信息:
git@github.com:权限被拒绝(公钥)。
我看过很多关于添加 ssh-keys 的帖子,但那是在本地,而不是在从 Github 操作运行的 ubuntu 版本中——我在这里缺少什么?我无法生成 ssh-keys 并将私钥即时添加到 Github repo-settings,我该如何解决这个问题?
【问题讨论】: