1、在github上建立了一个项目,发现push文件的时候,会出现如下错误
RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly
原因是使用了http方式 push
2、而且每次push的时候都需要输入密码很繁琐 所以使用ssh可以解决
具体过程:
在终端里边 输入 git remote -v
可以看到形如一下的返回结果
origin http://xxx/ios.git (fetch)
origin http://xxx/ios.git (push)
下面把它换成ssh方式
- git remote rm origin
- git remote add origin git@xxx/ios.git
- git push origin xxx