git push提示错误Write failed: Broken pipe解决

第一次git提交代码到github遇到错误:

[root@localhost tx2440a]# git push origin master

Counting objects: 76779, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (75565/75565), done.
Write failed: Broken pipe76779)   
fatal: The remote end hung up unexpectedly

error: failed to push some refs to '[email protected]:gitlao/tx2440a.git'

检查权限没有问题:

[root@localhost tx2440a]# ssh -T [email protected]
Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts.

Hi gitlao! You've successfully authenticated, but GitHub does not provide shell access.

网上找了一下,应该是ssh超时时间问题,我提交的代码太多导致超时了。

修改自己 root 目录下的.bash_profile文件,加上 
export TMOUT=1200 (以秒为单位) 
然后运行:

source .bash_profile

重新提交,成功:

[root@localhost tx2440a]# git push origin master
Counting objects: 76779, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (75565/75565), done.
Writing objects: 100% (76779/76779), 186.89 MiB | 545.00 KiB/s, done.
Total 76779 (delta 7507), reused 0 (delta 0)
remote: Resolving deltas: 100% (7507/7507), done.
To github.com:gitlao/tx2440a.git
 * [new branch]      master -> master
[root@localhost tx2440a]# 

你可能感兴趣的:(日常记录)