ssh exit status 255 is a connection problem
authorJoey Hess <joeyh@joeyh.name>
Fri, 3 Jan 2025 18:33:24 +0000 (14:33 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 3 Jan 2025 18:46:16 +0000 (14:46 -0400)
commita19a3076b57bc8779904e7fc03b0831f813aa99b
tree9b90b88dd057bfdc8f815f33faf279d3b2b8149a
parente8e36a90c13d61cc9e0e4523a10031572d8bbfd9
ssh exit status 255 is a connection problem

Previously, when the git config was unable to be read from a ssh remote,
it would try to git fetch from it to determine if the remote was
otherwise accessible. That was unnessary work, since exit status 255
indicates a connection problem.

As well as avoiding the extra work of the fetch, this also improves
things when a ssh remote cannot be connected to due to a problem with
the git-annex ssh control socket. In that situation, ssh will also exit 255.
Before, the git fetch was tried in that situation, and would succeed, since
it does not use the git-annex ssh control socket. git-annex would conclude
that git-annex-shell was not installed on the remote, which could be wrong.

I suppose it also used to be possible for the user to need to enter a
ssh password on each connection to the remote. If they entered the wrong
password for the git-annex-shell call, but then the right password for
the git fetch, it would also incorrectly set annex-ignore, and that
situation is also now fixed.
CHANGELOG
Git/Config.hs
Remote/GCrypt.hs
Remote/Git.hs
doc/forum/Control_socket_connect__40__..__47__.git__47__annex__47__ssh__47__server.lo/comment_1_f530349d80ca5f43e9b2304f63e4b960._comment [new file with mode: 0644]