From: Lamborn, Peter Craig Date: Tue, 16 Mar 2021 18:53:24 GMT Subject: GIT_SSH and mirror not working with git 2.30.1 Message-ID: We have some machines behind firewalls and gateways that cannot access git repos directly. We have been using GIT_SSH and mirror to push and pull git request through a less restricted machine. This has been working for a while, specifically both git 2.24.1 and git 2.28 can handle the method we have been doing. When you try the same thing with git 2.30.1, the "git push" commands still succeed. But "git pull" returns this: $ git pull hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. ssh: connect to host port 22: Operation timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. $ Does git 2.30.1 change something about mirrors and/or GIT_SSH that would cause git pulls to fail? Do we need to adjust our current process? Our method: destination_machine$ mkdir destination_machine$ cd destination_machine$ git --bare init ... workstation$ cat ssh-hop.sh #!/bin/bash MACHINE_REGEXP="<...>" if [[ $1 =~ $MACHINE_REGEXP ]]; then exec ssh ssh "$@" else exec ssh "$@" fi workstation$ chmod u+x ssh-hop.sh workstation$ export GIT_SSH=/ssh-hop.sh workstation$ cd workstation$ git remote add --mirror : workstation$ git push workstation$ git pull Thank you, Peter