来自 bitbucket.org 的 git clone 无法通过 https 工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22525906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 09:51:58  来源:igfitidea点击:

git clone from bitbucket.org is not working by https

gitclonebitbucket

提问by Khasan 24-7

I am facing the same problem as Could not resolve host: bitbucket.org; nodename nor servname provided, or not known. I have tried ip address given in comment, but it also gave the same message. Please, help to solve the issue. Here is the error code:

我面临与无法解析主机相同的问题:bitbucket.org; 提供了 nodename 或 servname,或者不知道。我试过评论中给出的 ip 地址,但它也给出了相同的消息。请帮忙解决问题。这是错误代码:

    MYNAME@DEVELOPER8 /d/Projects
    $ git clone https://[email protected]/PATH/TO/REPO.git
    Cloning into 'REPO'...
    fatal: unable to access 'https://[email protected]/PATH/TO/REPO.git/': Could not resolve host: bitbucket.org

回答by andrewoodleyjr

Sometimes we make mistakes configuring our proxy. Maybe this can help, reset your proxy.

有时我们会在配置代理时出错。也许这会有所帮助,请重置您的代理。

git config --global --unset http.proxy
git config --global --unset https.proxy

回答by ankit singh

When you create a repository in bitbucket, the user interface displays the exact clone command you need for you:

当您在 bitbucket 中创建存储库时,用户界面会显示您需要的确切克隆命令:

a busy cat

一只忙碌的猫

So, your clone command would need to be:

因此,您的克隆命令需要是:

https://[email protected]/username/reponame.git

https://[email protected]/username/reponame.git