我不知道为什么最近我的git pull开始挂起
我已经尝试过了
git fsck && git gc --prune=now
网络防火墙
这是我在Digital Ocean的网络防火墙中设置的
我无法上网,并ping谷歌
我无法从bitbucket ping或ssh
└── iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
└── ufw status
Status: inactive
我什至试图完全在网络级别和服务器级别禁用防火墙。我仍然看到相同结果
└──GIT_TRACE = 1 GIT_CURL_VERBOSE = 1 git pull
11:07:35.834628 git.c:344 trace: built-in: git pull
11:07:35.838802 run-command.c:646 trace: run_command: git fetch --update-head-ok
11:07:35.858628 git.c:344 trace: built-in: git fetch --update-head-ok
11:07:35.864635 run-command.c:646 trace: run_command: unset GIT_DIR GIT_PREFIX; ssh git@bitbucket.org 'git-upload-pack '\''jdoe/project.git'\'''
└──GIT_SSH_COMMAND =“ ssh -vvv” GIT_TRACE = 1 git pull
12:09:17.835895 git.c:344 trace: built-in: git pull
12:09:17.836775 run-command.c:646 trace: run_command: git fetch --update-head-ok
12:09:17.838743 git.c:344 trace: built-in: git fetch --update-head-ok
12:09:17.839407 run-command.c:646 trace: run_command: unset GIT_DIR GIT_PREFIX; 'ssh -vvv' git@bitbucket.org 'git-upload-pack '\''jdoe/project.git'\'''
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "bitbucket.org" port 8200
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to bitbucket.org [18.205.93.1] port 8200.
vi / etc / ssh / sshd_config
Port 8200
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
我还要检查什么?
答案 0 :(得分:2)
除了跟踪和协议(在您的情况下为SSH)之外,请检查要从中获取的远程托管服务器的状态。
例如GitHub had an incident yesterday,它可以解释克隆/拉取请求中的某些延迟。
我必须为SSH和DNS UDP添加出站规则
如our discussion中所述,问题是/etc/ssh/ssh_config
您知道为什么我一直尝试通过端口8200而不是22连接到BitBucket的原因吗?该设置在哪里?
这是第一行:端口8080更改为22
答案 1 :(得分:1)
我看到您的传出ssh连接正在通过端口8200而不是22。
因此,请确保检查文件 / etc / ssh / ssh_config 中以 Port 22 开头的行,如果已启用,则应将其注释掉。
答案 2 :(得分:0)
您为什么要尝试通过端口8200连接到bitbucket.org?
您不是要使用端口22吗?
bitbucket.org还在其末端禁用了ping功能,因此您可以执行以下操作来测试您与该站点的连接:
curl -skLi bitbucket.org