简体   繁体   English

git 在克隆 Bitbucket 存储库时出错

[英]git gives error while cloning a Bitbucket repository

I created one remote repository in BitBucket.我在 BitBucket 中创建了一个远程存储库。 Then I pushed one existing repository to the remote one from Windows.然后我将一个现有的存储库从 Windows 推送到远程存储库。 It gave SSL certificate error and I set the SSL verify to false by running the command "git config --global http.sslVerify false ".它给出了 SSL 证书错误,我通过运行命令“git config --global http.sslVerify false”将 SSL 验证设置为 false。 Then I could able to push and it did not ask for Username and Password.然后我可以推送并且它没有要求用户名和密码。

Now I am trying to clone the repository from Linux machine and Linux machine asked for password.现在我试图从 Linux 机器克隆存储库,而 Linux 机器要求输入密码。 I gave the password and pressed Enter.我给出了密码并按了 Enter。

Now the Linux machine gives error,现在Linux机器报错,

error:  while accessing https://jee@bitbucket.bmogc.net/scm/~jee/git_test_sshkey.git/info/refs

fatal: HTTP request failed 

But If I clone the repository from windows machine, It does not ask for password, and the clone was successful.但是如果我从 Windows 机器克隆存储库,它不会要求输入密码,并且克隆成功。

Could anyone please help to resolve this?有人可以帮忙解决这个问题吗?

Thanks, Jeeva谢谢,吉瓦

I suspect having /info/refs in the path is part of the trouble.我怀疑路径中有/info/refs是问题的一部分。

side note: It may help if you post the git command that you use, and not just the error.旁注:如果您发布您使用的 git 命令,而不仅仅是错误,它可能会有所帮助。 Also you might want to be careful what information is shown in your question.此外,您可能需要注意问题中显示的信息。

When you post your question it may be best to replace personal information with generic information.当您发布问题时,最好将个人信息替换为通用信息。 For example, in the question and answers here they use generic words like USERNAME and PROJECTNAME Can't clone a github repo on Linux via HTTPS例如,在此处的问答中,他们使用通用词,如USERNAMEPROJECTNAME Can't clone a github repo on Linux via HTTPS

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

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