简体   繁体   English

私人Git回购 - 在拉动时冻结

[英]Private Git repo - freezes at pulling

I just setup git on my linux server and configured SSH - I want to create private repository to work with my friends. 我只是在我的linux服务器上设置git并配置了SSH - 我想创建私有存储库以与我的朋友一起工作。 When I'm pulling or cloning that repo everything works fine (LAN), but when my friend tries pull or clone it (over Internet), git hangs at: 当我拉动或克隆那个回购时,一切正常(局域网),但是当我的朋友尝试拉或克隆它(通过互联网)时,git挂起:

remote: Compressing objects: x

where x is always lower than 17%. 其中x总是低于17%。

What's wrong with it or how could I fix it? 这有什么问题或我该如何解决?

PS: I not using gitosis, I initialized that remote repo with: git --bare init . PS:我没有使用gitosis,我使用: git --bare init初始化了远程repo。

Thanks in advance. 提前致谢。

Update: 更新:

The results commands: 结果命令:

$ cat .git/config

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = ssh://git@server:port/~/repo_name.git
fetch = +refs/heads/*:refs/remotes/origin/*

$ git fetch -v
Enter passphare for key '/c/Users/dev/.ssh/id_rsa':
remote: Counting objects: 76, done.
remote: Compressing objects: 21% (12/55)

However, when my friend got ZIP with sources and he pushed it, everything worked fine. 然而,当我的朋友获得ZIP来源并推动它时,一切正常。 So he is able to push. 所以他能够推动。 I added an empty file and pushed it, he successfully downloaded (pulled) it. 我添加了一个空文件并推送它,他成功下载(拉)它。

Get your friend to try: 让你的朋友尝试:

git fetch -v

If that doesn't give you the answer then get him to do this: 如果那不能给你答案那么让他这样做:

cat .git/config

If your server is secure then update your question to include the output of that command. 如果您的服务器是安全的,那么请更新您的问题以包含该命令的输出。 If it's not secure then change the IP and other identifying details to a fake IP and fake details, but try not to alter anything else as you may end up providing misleading info. 如果它不安全,那么将IP和其他识别细节更改为假IP和虚假细节,但尽量不要改变任何其他内容,因为您最终可能会提供误导性信息。


Edit based on update: 根据更新进行编辑:

The url should start with "ssh://" not "ssh/". 该网址应以“ssh://”而不是“ssh /”开头。 Although I'm about to go double check that. 虽然我要去仔细检查一下。

If Git push/pull freeze using a config that previously worked, try restarting the computer. 如果使用之前工作的配置Git推/拉冻结,请尝试重新启动计算机。

It sounds strange yet I have experienced this on Windows and Linux. 听起来很奇怪但我在Windows和Linux上遇到过这种情况。

在我进入以太网适配器设置并将Jumbo数据包大小从1514字节更改为9014字节之前,我遇到了同样的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM