Git上传代码遇到的报错

Git上传代码遇到的报错

1、git上传代码卡住(Total 7072 (delta 2508), reused 6844 (delta 2376), pack-reused 0)

Git上传代码遇到的报错

git config --global sendpack.sideband false
git config --local sendpack.sideband false
git config --global http.postBuffer 524288000
git config --global https.postbuffer 524288000
git config --global -l
git config --local -l
执行完这些命令后,再上传git push -u origin master,可能会稍微卡一会儿,然后就成功了。

2、修改保存在本地的git用户名密码

git config --global user.name "用户名"
git config --global user.password "密码"
git config --global -l #查看

3、上传代码报错:error: failed to push some refs to 'http://git.test.com/001/test.git'

#完整报错:
error: failed to push some refs to 'http://git.test.com/001/test.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
原因分析:这个问题是因为远程库与本地库不一致造成的
解决方法:可以把远程库同步到本地库,再把本地库推送到远程库
    git pull --rebase origin master
    git push -u origin master

4、上传代码报错:error: RPC failed; result=22, HTTP code = 413

#完整错误:
error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
原因分析:上传文件太大,超过了最大限制
解决方法:nginx传输限制:(nginx.conf)
       client_max_body_size 400M;
     git传输限制:
       git config --global http.postBuffer 524288000
       git config --global https.postBuffer 524288000

Git上传代码遇到的报错

上一篇:python的Socket网络编程 使用模板


下一篇:Cannot find tomcat目录/bin/setclasspath.sh This file is needed to run this program