小编sha*_*lya的帖子

加载密钥:詹金斯权限被拒绝

我正在尝试在 jenkins 中运行多分支工作。代码放在git中。在运行作业时,我遇到访问权限问题。在生成ssh-keygen詹金斯获取权限被拒绝错误时。

在 ubuntu 盒子中配置。

  1. 尝试从 /root/.ssh 复制 id_rsa 和 id_rsa.pub 但它不会复制 id_rsa 中的任何内容或允许手动编辑文件。
 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)

git jenkins

5
推荐指数
1
解决办法
9393
查看次数

标签 统计

git ×1

jenkins ×1