GIT_SSH and mirror not working with git 2.30.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mirror name>
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 <destination machine> 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 <DZPATH>
destination_machine$ cd <DZPATH>
destination_machine$ git --bare init

...

workstation$ cat ssh-hop.sh
#!/bin/bash
  
MACHINE_REGEXP="<...>"
  
if [[ $1 =~ $MACHINE_REGEXP ]]; then
  
  exec ssh <gateway> ssh "$@"
  
else
  exec ssh "$@"
fi

workstation$ chmod u+x ssh-hop.sh
workstation$ export GIT_SSH=<path to>/ssh-hop.sh
workstation$ cd <git repo>
workstation$ git remote add --mirror <mirror name> <destination_machine>:<DZPATH>
workstation$ git push <mirror name>
workstation$ git pull <mirror name>



Thank you,

Peter



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux