So i wanted to try local pairing for a while, but since i wanted to sync between local host and a remote server (which is heavily secured, firewall, block port except one available for ssh etc). Although, i could have used the ssh remote, but i couldn't found a flag to specify a private key file (might need to search more), since i'm using a separate private key + password to ssh into the remote server.
Anyway, tor installed fine on both host and server, but even though tor was working fine by itself (tried it using sock5 and curl to test), git-annex couldn't initialize it, and was stuck on Unable to connect to hidden service. It may not yet have propigated to the Tor network. (SocksErrorHostUnreachable) Will retry..
when using git annex enable-tor
I tried it on the assistant too with the same error in the logs.
I'm using default setting on the torrc, I'm on ubuntu 19.04 x86_64 using 7.20190129 version of git-annex.
P.S:I used this one liner to test if tor was working curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs
, not sure if there better way/other to test it.
EDIT: I updated the git-annex version on both the host and server, as i only now noticed they were old (and also since i tried a lot of other things and that was the last thing that could work).
Using 7.20190819+git2-g908476a9b-1~ndall+1 from neuron's repo.
Still not working and now stuck at git-annex: tor failed to create hidden service, perhaps the tor service is not running
when doing sudo git-annex enable-tor $(id -u)
(and yes, the tor service is indeed running, which make that weird)
Obvious, but i also made sure to restart both tor and git-annex before and after upgrading in my consecutive attempts.
I've just tested it on Debian with tor version 0.4.1.6, and it worked for me.
It seems to have gotten considerably further in the first error message you showed than in the second error message.
It's easier to investigate the second problem. git-annex is expecting tor to have created a directory with a name starting with "/var/lib/tor/tor-annex_" and with the git-annex UUID of your repository in its name. Inside that directory, it expects to find a hostname file that contains a tor onion address.
So tor is not creating that directory or that file, or the file contains something else. Which one it is will help narrow the problem.
I think it did indeed created (on the host) the required folder structure, and that it does contain a hostname file with the onion address inside (just checked). Not sure what's wrong here, but i believe i didn't checked if i was using latest version of tor on both the host and server (locally, its 0.3.5.8). didn't yet checked on the server yet as i launched a health stress check on the system, will get back to you on that one
If tor did create what git-annex enable-tor expects to find, then re-running the command should get past that error. If running the command again immediately fails with the same error message, then whatever tor is setting up is not what git-annex expects.