2015-10-26 41 views
1

我已經用完了選項。我嘗試了幾種方法,但都沒有工作,所以我希望有人能幫助我。通過代理使用ssh連接到Bitbucket

在工作中,我們使用代理服務器;目前我正在設置一個我想要從中推出的存儲庫。我想要使​​用ssh,所以我不需要密碼在工作或當我把筆記本電腦在家裏。

存儲庫已創建。 我已經創建了一個額外的獨特的ssh密鑰,並將其添加到bitbucket設置配置文件中。 我已經使用以下命令加載了ssh密鑰 - ssh-add〜/ .ssh/personal 我已檢查並且加載密鑰。

,當我嘗試連接到我的倉庫,使用克隆或任何其他行動(推或拉),這是行不通的

操作超時 致命的:無法從遠程存儲庫中讀取。

請確保您擁有正確的訪問權限 並存在存儲庫。

我也試圖創建的.ssh一個配置文件/使用下面的值

主機personalid 主機名bitbucket.org IdentityFile的〜/ .ssh /個人

但仍然不工作

我不知道是否是代理問題或其他問題,我認爲ssh應該允許我繞過一切。

有人可以給我一個關於如何診斷問題的想法嗎?

謝謝

=========

UPDATE:命令ssh -Tv [email protected]的結果

ssh -Tv [email protected] 
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 
debug1: Reading configuration data /Users/username/.ssh/config 
debug1: Reading configuration data /etc/ssh_config 
debug1: /etc/ssh_config line 20: Applying options for * 
debug1: Connecting to bitbucket.org [131.103.20.167] port 22. 
debug1: connect to address 131.103.20.167 port 22: Operation timed out 
debug1: Connecting to bitbucket.org [131.103.20.168] port 22. 
debug1: connect to address 131.103.20.168 port 22: Operation timed out 
ssh: connect to host bitbucket.org port 22: Operation timed out 

========= 

If i use port 443 

ssh -Tv -p 443 [email protected] 
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 
debug1: Reading configuration data /Users/username/.ssh/config 
debug1: Reading configuration data /etc/ssh_config 
debug1: /etc/ssh_config line 20: Applying options for * 
debug1: Connecting to bitbucket.org [131.103.20.167] port 443. 
debug1: connect to address 131.103.20.167 port 443: Operation timed out 
debug1: Connecting to bitbucket.org [131.103.20.168] port 443. 
debug1: connect to address 131.103.20.168 port 443: Operation timed out 

的ssh:連接到主機到位桶.org端口443:操作超時

when trying ssh -Tvp443 [email protected] 
ssh -Tvp443 [email protected] 
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 
debug1: Reading configuration data /Users/username/.ssh/config 
debug1: Reading configuration data /etc/ssh_config 
debug1: /etc/ssh_config line 20: Applying options for * 
debug1: Connecting to altssh.bitbucket.org [131.103.20.174] port 443. 
debug1: connect to address 131.103.20.174 port 443: Operation timed out 
ssh: connect to host altssh.bitbucket.org port 443: Operation timed out 
+0

嘿,你最終得到這個結果有多遠?我有同樣的問題,我覺得我幾乎在那裏,但放棄,因爲我得到了一個愚蠢的錯誤,我不明白。但是我找到的可能會幫助你。首先是這個git配置:https://gist.github.com/daicham/10253947第一行引用的'connect.exe'也被提及,可以在這篇其他有用的文章中下載:http://www.returnbooleantrue的.com/2009/06 /使用-github上貫通嚴厲-proxies.html。希望這至少有助於某人。 – igneosaur

回答

0

最好的診斷是僞造SSH會話:

ssh -Tv [email protected] 

(無論你使用的是Git還是Mercurial,這個測試可以做同樣的事情。)

由於-v,會有命令輸出的牆,但首先要查找的是這樣的一行:特定用戶名:

logged in as cpu2007. 

這將確定a)您到達Bitbucket並且b)您的密鑰已添加到您的帳戶。如果你沒有看到這樣的一行,那麼這應該有助於你診斷你的問題。

+0

我已經測試過這些命令,但沒有運氣。我在代理之後,我需要知道如何解決代理問題,但不知道如何設置它。 – cpu2007

+0

如果你嘗試'ssh -Tvp443 hg @ altssh.bitbucket.org',會發生什麼? –

+0

發生同樣的錯誤。 – cpu2007