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 'git@github.com:gitlao/tx2440a.git'

检查权限没有问题:

[root@localhost tx2440a]# ssh -T git@github.com
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]# 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值