2013-09-21 28 views
7

此錯誤每次我嘗試使用終端克隆從到位桶任何回購時間出現:無法解析主機:bitbucket.org;節點名稱也不servname提供,或者不知道

$ git clone https://[email protected]/me/myrepo.git 
Cloning into 'blog'... 
fatal: unable to access 'https://[email protected]/me/myrepo.git': Could not 
resolve host: bitbucket.org; nodename nor servname provided, or not known 

我有GitHub上的同樣的問題用「混帳」取代「HTTP」解決協議很棒!但是,當我試圖上到位桶我得到這個:

git clone git://[email protected]/me/myrepo.git 
Cloning into 'blog'... 
fatal: Unable to look up [email protected] (port 9418) (nodename nor servname 
provided, or not known) 

所以我刪除「我@」,使之成爲與實際的網頁,操作只是超時。幫幫我?

+0

bitbucket通常提供通過https或ssh克隆你的repo的鏈接,只需去你的bitbucket回購點擊克隆回購和複製/粘貼 – ermagana

+0

是的,這是我開始的代碼。 – Annie

+0

這個鏈接有幫助嗎? https://answers.atlassian.com/questions/172218/error-could-not-resolve-host – ermagana

回答

1

在你的~/.gitconfig,是否有一個[http]部分,其中有proxy條目?如果是這樣,那可能是你麻煩的根源。 (我從上面提供的幫助頁鏈接中提取了這個想法。)

+0

有關更多信息重新代理請參閱http://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server/19213999#19213999 –

-3

當通過mac osx上的終端從Bitbucket進行克隆時,只支持http,而不支持https。

你應該能夠使用完全相同的命令只是使用http。

Bitbucket存儲庫概述網頁提供了一個包含https的克隆命令。在Mac上,只需刪除's'即可。

+1

我們不支持http,只有https和ssh (與操作系統無關)。正如@ antoan-milkov所提到的,這看起來像是客戶端的DNS解析問題。 –

+0

我只是試了一遍。事實是,在運行git clone和使用http url時它是有效的。 – Avishai

+0

這是因爲我們將您重定向回https。 –

相關問題