Jenkins(Windows)无法通过git(Linux)存储库进行克隆

时间:2018-02-14 12:18:10

标签: windows git jenkins

设置详情:

Windows 10上的JENKINS

完成GIT插件设置

公共私钥设置已完成

通过CMD克隆存储库 Cloning repository through CMD works

通过Jenkins的git clone失败并出现以下错误

"C:\Program Files (x86)\Jenkins\workspace\Aclselenium>git clone rahulp@10.0.6.194:/Operations/repo/git/test.git 
Cloning into 'test'...
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."

JENKINS Console Logs

通过windows cmd运行以下命令

"whoami" command gives > "acl-wireless\rahulp"

"echo %USERNAME%" command gives `> "rahulp"`

当我通过JENKINS执行命令时,我收到:

"whoami" command gives > "nt authority\system"

"echo %USERNAME%" command gives `> "RAHULPANDEY$ RAHULPANDEY$"`

1 个答案:

答案 0 :(得分:0)

您对git的命令行访问权限以及对jenkins的{​​{1}}访问权限是两回事。从命令行,您将获得gitusername登录。但是从password开始,您需要配置凭据。转到jenkins => Manage Jenkins => Configure System请在那里提供凭据。