Git pressing when clicking on remote

When I try to click on a remote repository,

git push origin xyz

he is stuck. I try ssh -T git@github.com and I get success:

You have successfully authenticated, but GitHub does not provide shell access.

When I use the verbose option, I get a message that it clicks:

git push -v origin xyz

Clicking on git @ github.com: repo.git

and it will expire after 10 minutes with another message:

Connection to github.com closed by the remote host.

And I do not get the invitation back to the shell.

I tried the following, but to no avail:

  • including the --dry-run switch with push does the same.
  • git clean -d -f -i followd git gc --auto

I am on macOS High Sierra and use SSH authentication.

+5
source share
1 answer

It turned out that he was stuck due to a pre-press hold hook that was placed there (in <repository-root>/.git/hooks/pre-push ) with a third-party tool.

For debugging, I GIT_TRACE command from GIT_TRACE to:

 $ GIT_TRACE=1 git push -v origin xyz 11:47:11.950226 git.c:340 trace: built-in: git 'push' '-v' 'origin' 'xyz' Pushing to git@github.com :repo.git 11:47:11.951795 run-command.c:626 trace: run_command: 'ssh' ' git@github.com ' 'git-receive-pack '\''repo.git'\''' 11:47:13.100323 run-command.c:626 trace: run_command: '.git/hooks/pre-push' 'origin' ' git@repo.git ' 

Deleting the pre-push file fixes the problem.

+2
source

Source: https://habr.com/ru/post/1275310/


All Articles