无法将新的 git 存储库推送到 github

发布于 2024-12-10 17:34:12 字数 1074 浏览 0 评论 0原文

我一直在本地 git 存储库上工作,一切都运行良好。今天是时候分享代码了,我创建了一个 github 存储库,但我无法推送它。我尝试了所有能找到的压缩和修剪方法。这种情况以前发生过,我唯一的解决方案是创建一个新的存储库并将所有内容移过来并再次 git init。由于这种情况已经是第二次发生了,我真的很想把这件事彻底解决。

 Tim$ git remote add origin [email protected]:tbbooher/cba_fitwit.git
 Tim$ git push -u origin master
Counting objects: 7964, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2915/2915), done.
Read from remote host github.com: Connection reset by peer
fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: pack-objects died with strange error
error: failed to push some refs to '[email protected]:tbbooher/cba_fitwit.git'

在同一台机器(MacBook Pro)上,我可以使用其他四个存储库进行推拉操作,但我仍然怀疑存在一些 ssh 欺骗行为。压缩发生得非常快,然后一切都在这一点上减慢,并缓慢上升到大约 11%,然后像上面那样失败。

Writing objects:  10% (865/7964), 2.37 MiB | 203 KiB/s   

I've been working on a local git repository and everything has been working well. Today it was time to share the code, and I created a github repository, but I can't push to it. I tried all the compression and pruning methods I could find. This has happened before and my only solution was to create a new repo and move everything over and git init again. Since this has happened for a second time, I would really like to run this down.

 Tim$ git remote add origin [email protected]:tbbooher/cba_fitwit.git
 Tim$ git push -u origin master
Counting objects: 7964, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2915/2915), done.
Read from remote host github.com: Connection reset by peer
fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: pack-objects died with strange error
error: failed to push some refs to '[email protected]:tbbooher/cba_fitwit.git'

On the same machine (MacBook Pro), I'm able to push and pull with four other repos, but I still suspect some ssh trickery. Compressing happens very quickly, then everything slows way down at this point, and creeps along to about 11% and then fails as above.

Writing objects:  10% (865/7964), 2.37 MiB | 203 KiB/s   

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凝望流年 2024-12-17 17:34:12

尝试使用 https:// 地址而不是 git 地址。

Try using a https:// address instead of the git one.

梦境 2024-12-17 17:34:12

这是我的路由器的问题。我去了一个新位置,一切都进展顺利,现在我很好奇如何纠正我的路由器。

有趣的是,一旦我进行了初始推送,路由器就可以很好地处理它。

This is an issue with my router. I went to a new location and everything pushes just fine, now I am curious how to correct my router.

It is interesting to note, that once I did the initial push, the router can handle it just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文