Git通过设置http.proxy配置参数在代理环境中工作.
对于某些地址,我需要绕过代理.是否有无代理/绕过代理配置参数?
Git通过 HTTPS 为 81 kB 存储库写入对象时挂起(不允许 SSH)。来自 Nginx 的具体错误信息access.log如下:
POST /Hello-World/.git/git-receive-pack HTTP/1.1" 504 183 "-" "git/2.28.0.windows.1"
Run Code Online (Sandbox Code Playgroud)
我在已挂载的 Debian 映像中托管 Nginx 和 Git 服务器。需要注意的重要事项:我www的所有网站文件都以只读方式单独安装。我的 Git 根文件夹也在里面www(即,www/git)。
sudo mount -o loop,offset=1 raspbian-stretch-lite.img /mnt/
sudo mount --bind www/ /mnt/usr/share/nginx/www/
sudo mount -o bind,remount,ro /mnt/usr/share/nginx/www
Run Code Online (Sandbox Code Playgroud)
我的 Nginx 配置如下:
server {
listen 443 ssl;
server_name git.domain.com;
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
# fast clone static files
location ~ \.git/objects/(?:[0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+\.(?:pack|idx))$ {
root /usr/share/nginx/www/git;
limit_except GET HEAD …Run Code Online (Sandbox Code Playgroud) 我正在尝试配置Jenkins(在Windows Server 2008上运行)连接到GitLab 6.0存储库(在Linux机器上).
从我的本地Windows框中,我可以使用SSH URL克隆我的GitLab服务器上的项目.我在使用HTTP URL时遇到了一些问题,但我确实设法使用Eclipse插件使用HTTP进行身份验证.
在Jenkins项目配置屏幕上,我尝试过:
无法连接到存储库:
命令"d:\ tools\Git\bin\git.exe ls-remote -h http://myserver.domain/mygroup/myproject.git HEAD"
返回状态码128:
stdout:stderr:错误:访问时请求的URL返回错误:504
HTTP://myserver.domain/mygroup/myproject.git/info/refs服务=混帐上传包
致命:HTTP请求失败
当我在浏览器中尝试此URL时,我会获得一个身份验证弹出窗口.如果我输入我的电子邮件和密码,我可以成功下载分支和标签列表.
...好的,我应该能够在URL中指定用户名和密码,对吧?
...不:
http:// username:password@myserver.domain/mygroup/myproject.git/info/refs无效:这是一个git存储库吗?
Windows GUI在使用SSH时没有任何问题.
......詹金斯似乎并不喜欢那么多:
git@myserver.domain:MYGROUP/myproject.git
错误"请输入Git存储库"仍然存在,当我尝试保存配置时,我看到以下堆栈跟踪:
Exception: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from
{"value":"2",
"userRemoteConfigs":
{"url":"git@myserver.domain:mygroup/myproject.git",
"name":"origin","refspec":""
},
"branches":{"name":""},
"includedRegions":"","excludedRegions":"","excludedUsers":"",
"localBranch":"","relativeTargetDir":"","reference":"",
"scmName":"",
"gitConfigName":"","gitConfigEmail":"",
"pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,
"disableSubmodules":false,"recursiveSubmodules":false,
"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,
"useShallowClone":false,"":["","0"],
"gitTool":"Default",
"browser":{"stapler- class":"hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}
Stacktrace:
javax.servlet.ServletException:
java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM from {...}
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:725)
...
Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.git.GitSCM …Run Code Online (Sandbox Code Playgroud)