从 linux 中的 jenkins 连接时,git 存储库出现 403 错误 [英] git repository gives 403 error while connecting from jenkins in linux
本文介绍了从 linux 中的 jenkins 连接时,git 存储库出现 403 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我只想将我的项目从 github 配置到 jenkins 以生成构建.我收到以下错误
Hi I just want to configure my project from github to jenkins to generate build. I'm getting following error
Failed to connect to repository : Command "/usr/bin/git ls-remote -h
https://github.com/xxxxx/yyyyy.git HEAD"
returned status code 128:
stdout:
stderr: error: The requested URL returned error: 403 Forbidden while
accessing https://github.com/xxxxx/yyyyy.git/info/refs
fatal: HTTP request failed
我还在全局工具配置中添加了 git 路径.我已经在 linux centos 服务器上设置了 jenkins.
I have added git path at Global Tool Configuration also. I've setup jenkins in linux centos server.
我在 stackoverflow 中发现了一些类似的问题,但这并没有给出解决方案
I have found few similar questions in stackoverflow but that doesn't give a solution
谁能告诉我这可能有什么问题?在此先感谢
Can anyone please tell me what may be wrong in that ? Thanks in advance
推荐答案
有点晚了,但这个解决方案对我有用.只需将网址更改为
A bit late, but this solutions works for me. Just change the URL from
https://github.com/xxxxx/yyyyy.git
到
https://youruser@github.com/xxxxx/yyyyy.git
这篇关于从 linux 中的 jenkins 连接时,git 存储库出现 403 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文