github - git push出錯,求幫助?
黄舟
黄舟 2017-05-02 09:27:47
0
2
483

我在win下使用git推送到github遇到了這個問題
請問該怎麼解決

$ git push -u origin master
ssh: Could not resolve hostname xxx: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

全部回覆(2)
小葫芦

git remote -v 檢查你的origin路徑是否合法。一般來說應該是:

ssh://git@<host>:<port>/path_to_source.git 

從報錯資訊來看,是找不到xxx這個主機;

  1. 確保倉庫地址正確

  2. 修改hosts文件,加入host名字和IP的對應關係,或修改.git/config檔案下的origin的url為IP位址

phpcn_u1582

檢查下dns,沒問題的話檢查下你要push到的倉庫裡是否有你目前機器的公鑰。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!