git push hangs after Total line

后端 未结 17 1163
孤独总比滥情好
孤独总比滥情好 2020-12-05 16:38

My git push is hanging after appearing to complete the push. I am going git push

Counting objects: 51, done.
Delta compression using up to 2 threads.
C         


        
17条回答
  •  时光说笑
    2020-12-05 17:32

    This issue can be caused by issues with your SSH agent.

    I recently ran into this issue because I changed my default shell from zsh to bash. I'd originally set up my ssh keys using zsh, and so they were not available by default to bash, using chsh -s /bin/bash.

    To fix, you'll need to add your ssh key(s) to the SSH authentication agent using the same shell script (bash, sh, zsh, etc) you're using to perform your git commands:

    eval `ssh-agent`
    ssh-add ~/.ssh/some_key_rsa
    

    You'll need to enter the passphrase for the key in order to add it. To store the passphrase to your user keychain so you don't need to enter it every time the key is used, add the key with the -K option to the ssh-add command.

    ssh-add -K ~/.ssh/some_key_rsa
    

    Note the uppercase K as using a lowercase is a different command option.

提交回复
热议问题