简体   繁体   English

通过HTTP和SSL验证的Git克隆问题

[英]Issues with Git clone over HTTP and SSL verification

I'm having issues with accessing repository on Stash on a private server. 我在访问私有服务器上Stash上的存储库时遇到问题。 When doing the following clone command, the repository is not able to authenticate and connect to the site. 在执行以下克隆命令时,存储库无法认证并连接到站点。

git clone https://username@server.com:usr/projects/testproject/project.git

The command is timing out and is not authenticating with my web server. 该命令正在超时,并且未通过我的Web服务器进行身份验证。 I've tried the following code globally to help bypass the SSL verification which I've found is likely the issue, but it's not working. 我在全球范围内尝试了以下代码,以帮助绕过我发现的SSL验证,这很可能是问题所在,但无法正常工作。

git config --global http.sslVerify false 

Doing this to try bypassing the SSL verification but am still not able to connect. 这样做可以绕过SSL验证,但仍然无法连接。 If I go to my browser and type in the URL, it authenticates automatically for me and I'm able to access the repo. 如果我进入浏览器并输入URL,它将为我自动进行身份验证,并且可以访问该存储库。 The issue is that many of my users will only be doing this through the terminal command line. 问题是我的许多用户只能通过终端命令行执行此操作。 Any help with this matter would be greatly appreciated. 对此问题的任何帮助将不胜感激。

I recently went into same issue and found this: Check this out: http://blog.vogella.com/2010/08/09/git-https/ 我最近遇到了同样的问题,并发现了这个问题:请查看: http : //blog.vogella.com/2010/08/09/git-https/

However a piece of advice (i learnt it the hard way): Try not to use the dumb protocols as much you can avoid them. 但是,有一条建议(我很辛苦地学到了):尽量不要使用愚蠢的协议,因为它们可以避免使用它们。 Setting up repos over SSH was a great help and it saved a lotta pain. 通过SSH设置存储库是一个很大的帮助,它减轻了很多麻烦。 You could look into it as well. 您也可以研究一下。

Hope it helps! 希望能帮助到你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM