2015-10-05 29 views
3

每次運行brew update時,我都會收到幾個URL的超時。每次運行命令時,它都是一組不同的URL。但在我的網絡瀏覽器中訪問URL很快,我沒有遇到任何問題。這裏是自制的輸出:Homebrew從github.com獲取超時

fatal: unable to access 'https://github.com/caskroom/homebrew-cask/': Failed to connect to github.com port 443: Operation timed out 
Error: Failed to update tap: caskroom/cask 
fatal: unable to access 'https://github.com/caskroom/homebrew-fonts/': Failed to connect to github.com port 443: Operation timed out 
Error: Failed to update tap: caskroom/fonts 
fatal: unable to access 'https://github.com/Homebrew/homebrew-dupes/': Failed to connect to github.com port 443: Operation timed out 
Error: Failed to update tap: homebrew/dupes 
fatal: unable to access 'https://github.com/Homebrew/homebrew-php/': Failed to connect to github.com port 443: Operation timed out 
Error: Failed to update tap: homebrew/php 
Already up-to-date. 

有什麼我可以做這件事,像增加超時時間?我在man page上找不到任何東西。

編輯

在我得知我的互聯網服務提供商合併另一家公司其間。現在他們遇到了麻煩,因爲突然間有更多的人使用同一個網絡。我嘗試brew update連接到大學的無線網絡,並沒有任何麻煩。所以我想從家裏更新我需要一些方法來增加超時限制或自動重試單個請求到相應的失敗的github回購幾次,然後發出類似的錯誤。

回答

2

升級到El Capitan後我遇到了同樣的事情。首先,我嘗試更新brew,獲得權限被拒絕。在使用sudo(我的​​壞:))後,它生成了一些由root擁有的git文件。

現在你得到超時。

 sudo chown -R $(whoami):admin /usr/local 

之後

 brew update 

再次工作。

+0

不行。這對超時沒有幫助。但無論如何感謝。 – zabbarob

1

我在代理服務器上得到了同樣的plobrem。通過設置代理解決了問題。

設置代理:如果沒有用戶名和密碼

git config --global http.proxy http://proxy.com:port 
git config --global https.proxy http://proxy.com:port 

設定代理:用戶名和密碼

git config --global http.proxy http://username:[email protected]:port 
git config --global https.proxy http://username:[email protected]:port 

如果不是有效果,重新設置。

git config --global http.proxy '' 
git config --global https.proxy '' 
+0

這是有趣的知道,但可悲的是不是我的解決方案,因爲我沒有代理。 – zabbarob

相關問題