git push報錯
key_load_public: invalid format
解決:
cd ~/.ssh && ll //確認公鑰存在
ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub //修復公鑰
git fetch origin 報錯:
Connection reset by 10.10.10.10 port 10
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因:
(1)sshkey 沒有或者失效,更新sshkey 公鑰到github上
(2)公司內(nèi)網(wǎng)絡限制,申請公司內(nèi)代碼倉庫
報錯:
"fatal: The remote end hung up unexpectedly"
解決:
git config --global http.postBuffer 1048576000
.gitignore不生效的解決方法:
$ git rm -r --cached .
$ git add .
$ git commit -m "fixed untracked files"
本地項目push到github:
1 github創(chuàng)建倉庫,生成一個ssh鏈接:xxx.git
2 本地進入準備提交的項目路徑下,
git clone xxx.git
git status
git add .
git commit -m "注釋,給我上去"
git push
從github pull 代碼回來:
git fetch origin