【发布时间】:2016-02-22 14:29:06
【问题描述】:
我在一台 Linux 机器上配置了 Jenkins,而我的 git repo 在另一台 Linux 服务器上。但是当我尝试将 repo 的 URL 提供给 Jenkins 时,我收到以下错误。
Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h ssh://user@ip/~/export1 HEAD" returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这可能是什么原因?
我发现两个系统的 rsa 密钥都存在于彼此的 .ssh/known_hosts 文件夹中。
我也可以将代码从 repo 拉取或克隆到 Jenkins 系统中的文件夹中。那么为什么詹金斯不能接受呢?
我也试过网址user@ip:/fullpath/to/repo
【问题讨论】:
-
你试过 user:password@ip:/fullpath/to/repo 吗?
-
我的仓库是一个带有分支的裸仓库。它是一个简单的 repo 对 URL 有什么影响或改变吗?
标签: linux git github jenkins ssh