jenkins - Jenkins:Git 无法连接到存储库,返回状态码 128
问题描述
我正在尝试克隆远程 GitHub 企业存储库,并在将远程存储库的 URL 添加到我的 Jenkins 配置中的 Git 插件后遇到以下错误:
Failed to connect to repository : Command "git.exe ls-remote -h https://<<server>>/M/AS.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://<<server>>/M/AS.git/': Received HTTP code 502 from proxy after CONNECT
解决方案
首先,您还需要在下面的部分中使用 jenkins 设置 github
转到Github --> click on profile dropdown
--> settings
--> devloper settings
--> personal access token
-->
generate new token
--> select all scopes
-->copy the token
然后去Jenkins --> manage Jenkins
--> github settings
--> add user
--> Select secret text
-->paste the token
然后通过单击测试按钮测试 git-hub 连接如果成功,Jenkins 将准备克隆 GitHub 存储库
并且还在 GitHub 中添加 Webhook、集成和服务
推荐阅读
- r - 如何更改 csv 中的值。使用闪亮的滑动条?
- reactjs - 超集 ui 图表类型未注册
- java - Java bin 不在我的路径中,但我可以从终端运行 java 和 javac。这是怎么发生的?
- jenkins - 如果我需要部署所有服务器,如何通过Jenkins中的参数化值选择多个服务器。?
- python - 处理大量excel文件的脚本
- angular - 在没有 Ivy 的 Angular 10 库中导入 RouterModule
- api - 视图如何使用视图模型和网络 API 获取数据
- python-3.x - 如何将数据传递给pytest中的monkeypatch
- c# - 无法使用 VIsual Studio 2019 安装 dotnet-svcutil 来注册 wsdl 服务
- python - 我想在 python rewrite 中编写 discord bot 以检查仅在频道中发送的嵌入中的内容