code-8
code-8

Reputation: 58632

GIT pull suddenly hang

I have no idea why lately my git pull started to hang

I've tried this already

git fsck && git gc --prune=now

enter image description here


Update

Network Firewall

This is what I set in my Network Firewall at Digital Ocean

enter image description here

I cant get to internet, and ping google

enter image description here

I can't ping or ssh from bitbucket

enter image description here


Update 2

└── iptables -S                                                                                                                 
-P INPUT ACCEPT                                                                                                                   
-P FORWARD ACCEPT                                                                                                                 
-P OUTPUT ACCEPT                                                                                                                  


                                                                                      
└── ufw status                                                                                                                    
Status: inactive 

Update 3

I even tried to disabled the firewall completely on the networking level, and inside the server level.I still seem the same result


Update 4

└── 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 [email protected] 'git-upload-pack '\''jdoe/project.git'\'''  

Update 5

└── 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' [email protected] '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.   

Update 6

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  

What else do I check ?

Upvotes: 6

Views: 9293

Answers (3)

VonC
VonC

Reputation: 1323203

In addition of traces, and protocols (SSH in your case), check the status of the remote hosting server you are pulling from.

For instance, GitHub had an incident yesterday, which can explain some delay in clone/pull request.

This DigitalOcean thread mentions:

I had to add outbound rule for SSH and DNS UDP

As mention in our discussion, the issue was /etc/ssh/ssh_config

Do you know why I kept trying to connect to BitBucket at port 8200 instead of 22 ? Where is the settings for that ?

That was the first line: Port 8080 to change to 22

Upvotes: 5

nct
nct

Reputation: 355

As i see your outgoing ssh connection is going throught port 8200 instead of 22.
So please make sure to check the line start with Port 22 in file /etc/ssh/ssh_config , you should comment it out if it enabled.

Upvotes: 2

Ron
Ron

Reputation: 6551

Why are you trying to connect to bitbucket.org via port 8200?

Shouldn't you be using port 22?

Also bitbucket.org has disabled ping on their end, so to test your connectivity to the site you an do:

curl -skLi bitbucket.org

Upvotes: 0

Related Questions