Git操作遇到“git did not exit cleanly (exit code 128)”错误
在上传些代码的时候,有时候会遇到:
git did not exit cleanly (exit code 128);
what!!!
查找资料后发现,通常都是网络原因。
找了网上解决的方法:
鼠标右键 -> TortoiseGit -> Settings -> Network
SSH client was pointing to C:\Program Files\TortoiseGit\bin\TortoisePlink.exe
Changed path to C:\Program Files (x86)\Git\bin\ssh.exe
git账号切换后push导致403
fatal: unable to access 'https://xxx/xx.git/': The requested URL returned error: 403
解决办法,切换远程ssh连接,不用https
git remote rm origin
git remote add origin git@github.com/xx:xx.git
复制代码
Github拉取慢
配置hosts文件
# mac配置方式
code /etc/hosts
复制代码
# 添加以下内容
# GitHub Start (chinaz.com) =================================================
13.229.188.59 github.com
54.169.195.247 api.github.com
140.82.113.25 live.github.com
8.7.198.45 gist.github.com
# 185.199.108.154 github.githubassets.com
# 185.199.109.154 github.githubassets.com
185.199.110.154 github.githubassets.com
# 185.199.111.154 github.githubassets.com
34.196.247.240 collector.githubapp.com
# 52.7.232.208 collector.githubapp.com
52.216.92.163 github-cloud.s3.amazonaws.com
151.101.108.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.108.133 avatars.githubusercontent.com
151.101.108.133 avatars0.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
151.101.108.133 avatars2.githubusercontent.com
151.101.108.133 avatars3.githubusercontent.com
151.101.108.133 avatars4.githubusercontent.com
151.101.108.133 avatars5.githubusercontent.com
151.101.108.133 avatars6.githubusercontent.com
151.101.108.133 avatars7.githubusercontent.com
151.101.108.133 avatars8.githubusercontent.com
151.101.108.133 avatars9.githubusercontent.com
151.101.108.133 avatars10.githubusercontent.com
151.101.108.133 avatars11.githubusercontent.com
151.101.108.133 avatars12.githubusercontent.com
151.101.108.133 avatars13.githubusercontent.com
151.101.108.133 avatars14.githubusercontent.com
151.101.108.133 avatars15.githubusercontent.com
151.101.108.133 avatars16.githubusercontent.com
151.101.108.133 avatars17.githubusercontent.com
151.101.108.133 avatars18.githubusercontent.com
151.101.108.133 avatars19.githubusercontent.com
151.101.108.133 avatars20.githubusercontent.com
# GitHub End ==================================================================
复制代码
具体可以参考:
www.cnblogs.com/lurenq/arch…