首頁  >  問答  >  主體

我研究了一週怎麼都沒辦法用Git Bash上傳到遠端函式庫?

ssh:connect to host github.com port 22:Bad file number
fatel;cound not read from remote repository.
please make sure you have the correct access rights
and the repository exists ??
我研究了一週怎麼都沒辦法用Git Bash上傳到遠端函式庫?

PHP中文网PHP中文网2726 天前688

全部回覆(3)我來回復

  • 阿神

    阿神2017-05-02 09:20:44

    github為例,我搜尋了這篇:
    https://help.github.com/articles/error-bad-file-number/
    首先使用以下命令測試:ssh -vT git@github.com發現更多錯誤訊息。

    然後結合你現在看到的錯誤提示:

    ssh:connect to host github.com port 22:Bad file number
    fatel;cound not read from remote repository.
    please make sure you have the correct access rights
    and the repository exists 
    

    大概是權限問題吧,
    1. 試著把公鑰上傳到github
    2. 遠端的repo的權限不夠?

    回覆
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:20:44

    GIT設定問題:
    第一步:
    設定

    git config --global user.name "你在githbub上注册的名"
    
    git config --global user.email "你在githbub上注册的电邮"
    

    第二步: 授權,假設你用SSH來連接

    第三步驟 建立庫,這個在GITHUB上操作,不用累述

    當你在本地

    git commit
    

    然後,就

    git push 
    

    你看到提示' git remote add <name> <url>'
    然後,你再

    git push
    

    說太多了,如果你看英文幫助,都在裡面
    git 配置

    回覆
    0
  • PHP中文网

    PHP中文网2017-05-02 09:20:44

    你應該在.ssh目錄加入一個config檔設定埠443

    回覆
    0
  • 取消回覆