我正在尝试在 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)