我正在尝试在 jenkins 中运行多分支工作。代码放在git中。在运行作业时,我遇到访问权限问题。在生成ssh-keygen詹金斯获取权限被拒绝错误时。
在 ubuntu 盒子中配置。
git ls-remote -h git@github.com:****/*****1.git HEAD
The authenticity of host 'github.com ("IP Address")' can't be established.
RSA key fingerprint is SHA256:********************Y8.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/var/lib/jenkins/.ssh/known_hosts).
Load key "/var/lib/jenkins/.ssh/id_rsa": Permission denied
Permission denied (publickey).
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
Load key "/var/lib/jenkins/.ssh/id_rsa": Permission denied是关于读取本地文件系统上的本地私有 ssh 密钥,与远程服务器无关。
确保您具有 ssh 密钥的读取权限。(当我的密钥由 Windows 主机加密但我的 Docker 容器无法解密时,我遇到了此问题。)
您也可以随时生成一个新密钥并尝试该密钥。
| 归档时间: |
|
| 查看次数: |
9393 次 |
| 最近记录: |