Please describe the problem.
attempting to the use feature which allows me to connect to a friends remote repository results in failure, in which i have tested using multiple methods
What steps will reproduce the problem?
WEBAPP
- open the webapp
- add repository
- choose "share with a friend"
- click "lets get started"
- encounter the error found in the transcript below
COMMAND LINE
enable tor
- git annex enable tor
- encounter error found in the transcript below
p2p --pair
- git annex p2p --pair
- encounter the error found in the transcript
What version of git-annex are you using? On what operating system?
Please provide any additional information below.
external dependency version info
- git annex: using git annex found in nixos repositories
- python version: attempted both python3 and python2.7
- magic-wormhole version: attempted both 0.12.0 under python3, and version 0.10.0 under python2.7
- tor version information: Tor version 0.4.7.10. Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1q, Zlib 1.2.12, Liblzma 5.2.5, Libzstd 1.5.2 and Glibc 2.34 as libc. Tor compiled with GCC version 11.3.0
transcript
#### WEBAPP
##### error output after following steps as described above
Failed to enable tor
enable-tor
You may be prompted for a password
git-annex: This can only be run in a git-annex repository.
git-annex: Failed to run as root: /nix/store/c42x83x25df9xd053xiii24mawnrlvrd-git-annex-10.20220504/bin/git-annex enable-tor 1000
failed
enable-tor: 1 failed
#### COMMAND LINE
##### enable tor
git annex enable-tor
Failed to enable tor
enable-tor
You may be prompted for a password
git-annex: This can only be run in a git-annex repository.
git-annex: Failed to run as root: /nix/store/c42x83x25df9xd053xiii24mawnrlvrd-git-annex-10.20220504/bin/git-annex enable-tor 1000
failed
enable-tor: 1 failed
##### git annex p2p --pair
git annex p2p --pair
p2p pair peer1 (using Magic Wormhole)
Failed sending data to pair.
failed
p2p: 1 failed
# End of transcript or log.
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
git annex has been awesome so far in helping track and backup my data, also for allowing me to output podcasts/audiobooks to a small mp3 player, as well as ebooks and pdfs to a kindle paper ewhite, which has made using my ereader no longer an inconvinient endeavour
I can reproduce this by running eg:
This was broken by git's security fix for CVE-2022-24765. Now when the root process tries to run
git config --list
, git does not display the local .git/config, because it is owned by another user.Note that when git-annex uses sudo to gain root, git does not behave that way. But it can also use su or other methods.
Fixed
git-annex enable-tor
The
git-annex p2p --pair
failing is unrelated. It seems thatwormhole
has either changed its syntax for --appid, or git-annex has never passed --appid to it correctly. I've fixed it to use the current syntax.