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)公司内网络限制,申请公司内代码仓库
报错:
"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创建仓库,生成一个ssh链接:xxx.git
2 本地进入准备提交的项目路径下,
git clone xxx.git
git status
git add .
git commit -m "注释,给我上去"
git push
从github pull 代码回来:
git fetch origin