Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.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
错误:拒绝授予project/repo.git部署密钥的权限_Git_Github_Jenkins - Fatal编程技术网

错误:拒绝授予project/repo.git部署密钥的权限

错误:拒绝授予project/repo.git部署密钥的权限,git,github,jenkins,Git,Github,Jenkins,我试图将Jenkins中GitHub Enterprise中的一个存储库设置为默认的拉取源。在我们的项目中,Jenkins用于在我们推动某些更改时自动构建整个代码库。在我们在项目空间使用本地安装的GIT之前。现在我们正在迁移到GHE 我在配置>源代码管理选项卡>存储库URL>git@github.com:项目/回购 在强制构建之后,现在我们得到了日志错误: ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitExcept

我试图将Jenkins中GitHub Enterprise中的一个存储库设置为默认的拉取源。在我们的项目中,Jenkins用于在我们推动某些更改时自动构建整个代码库。在我们在项目空间使用本地安装的GIT之前。现在我们正在迁移到GHE

我在配置>源代码管理选项卡>存储库URL>git@github.com:项目/回购

在强制构建之后,现在我们得到了日志错误:

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress git@github.com:project/repo +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:ZjDIk3kbdyojRjqiBBfXS6xOHF+y+9bzcbZypukADHA.
Please contact your system administrator.
Add correct host key in <jenkins_home>/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in <jenkins_home>/.ssh/known_hosts:49
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
ERROR: Permission to project/repo.git denied to deploy key
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
还尝试在GHE存储Jenkins服务器的存储库特定路径,但未发现任何更改:

https://:8080/作业//


建议/帮助将不胜感激。谢谢

看起来您正在使用多个键。 除非另有说明,否则SSH将加载默认密钥

创建一个SSH配置文件 当您有多个标识文件时,请创建一个SSH配置文件,以便为各种标识创建别名

可以使用许多参数和不同的方法构造SSH配置文件

本例中使用的别名条目的格式为:

Host alias 
  HostName <domain.com>
  IdentityFile ~/.ssh/identity
如果没有配置文件,请创建一个。 为每个标识组合添加别名,例如:

Host host1
HostName <domain1>
IdentityFile ~/.ssh/key1

Host host2
HostName <domain2>
IdentityFile ~/.ssh/key2
在您的情况下,域应该是相同的,并添加两个密钥:id_rsa、id_ecdsa

编辑ssh配置:

nano ~/.ssh/config
仅设置标识符=否

Host *
        IdentitiesOnly=no

由于

我在/.ssh/config上没有任何访问权限。你是说我的本地~/.ssh/config文件吗?它应该在你的两个密钥所在的机器上。
nano ~/.ssh/config
Host *
        IdentitiesOnly=no