Bug #12205

Confusing error message when (successfully) cloning Git repos over HTTPS

Added by anonym 2017-02-01 12:04:19 . Updated 2017-03-18 11:19:09 .

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
Target version:
Start date:
2017-02-01
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

$ git clone https://github.com/micahflee/onionshare
Failed to get capabilities of file `/usr/bin/git' (Operation not supported)
Cloning into 'onionshare'...
remote: Counting objects: 3934, done.
remote: Compressing objects: 100% (9/9), done.
Receiving objects: 100% (3934/3934), 4.23 MiB | 1.68 MiB/s, done.
remote: Total 3934 (delta 2), reused 0 (delta 0), pack-reused 3924
Resolving deltas: 100% (2471/2471), done.
1485949933 ERROR torsocks[11721]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:683)


The repo is cloned successfully though, so not a blocker.


Subtasks


Related issues

Blocked by Tails - Bug #12091: torsocks prints "Failed to get capabilities of file" to stderr Resolved 2016-12-27

History

#1 Updated by intrigeri 2017-02-01 13:07:36

  • Subject changed from Non-fatal but ugly error when cloning Git repos over HTTPs on Stretch to Confusing error message when (successfully) cloning Git repos over HTTPS
  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

Passing --debug to torsocks in /usr/local/bin/git tells me that the name that can’t be resolved is “amnesia”:

1485952637 DEBUG torsocks[7300]: [getaddrinfo] Requesting amnesia hostname (in tsocks_getaddrinfo() at getaddrinfo.c:44)
1485952637 DEBUG torsocks[7300]: Resolving amnesia on the Tor network (in tsocks_tor_resolve() at torsocks.c:544)
1485952637 DEBUG torsocks[7300]: Setting up a connection to the Tor network on fd 8 (in setup_tor_connection() at torsocks.c:367)
1485952637 DEBUG torsocks[7300]: Socks5 sending method ver: 5, nmethods 0x01, methods 0x00 (in socks5_send_method() at socks5.c:229)
1485952637 DEBUG torsocks[7300]: Socks5 received method ver: 5, method 0x00 (in socks5_recv_method() at socks5.c:262)
1485952637 DEBUG torsocks[7300]: [socks5] Resolve for amnesia sent successfully (in socks5_send_resolve_request() at socks5.c:639)
1485952637 ERROR torsocks[7300]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:683)

I have no idea why Git wants to resolve the local hostname. I can’t reproduce that on my own sid system (that has nameserver 127.0.0.1 pointing to Tor in case that matters), even if I enable AllowOutboundLocalhost. I’ve tried to make Tails config as close as possible to mine, and I still get the same error. Next step would be to strace the whole thing to understand why Git wants to resolve “amnesia”.

#2 Updated by intrigeri 2017-02-01 13:55:33

  • related to Bug #11736: torsocks complains when used with Monkeysign, but works anyway added

#3 Updated by emmapeel 2017-02-08 15:47:53

  • is duplicate of Bug #12091: torsocks prints "Failed to get capabilities of file" to stderr added

#4 Updated by intrigeri 2017-02-17 11:41:24

  • Assignee set to intrigeri
  • Priority changed from Low to Normal

It makes Git command completion very painful, which affects a number of contributors.

#5 Updated by intrigeri 2017-03-17 12:50:50

  • Assignee deleted (intrigeri)
  • Priority changed from Normal to Elevated

#6 Updated by Anonymous 2017-03-17 14:31:35

  • Status changed from In Progress to Resolved

#7 Updated by Anonymous 2017-03-17 14:38:46

  • Status changed from Resolved to Confirmed

#8 Updated by Anonymous 2017-03-17 14:39:33

Sorry, this part is not resolved, so reopening.

More detail when this happens:

POST git-upload-pack (gzip 1691 to 898 bytes)
remote: Counting objects: 4037, done.
remote: Compressing objects: 100% (1773/1773), done.
remote: Total 4037 (delta 2207), reused 3756 (delta 2041)
Receiving objects: 100% (4037/4037), 1.39 MiB | 484.00 KiB/s, done.
Resolving deltas: 100% (2207/2207), done.
1489761628 ERROR torsocks[6700]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:683)

#9 Updated by intrigeri 2017-03-18 10:44:37

  • Status changed from Confirmed to In Progress

The part that’s fixed already is Failed to get capabilities of file `/usr/bin/git' (Operation not supported).

Note that AllowOutboundLocalhost 2 is not enough to fix the other (Unable to resolve) confusing message.

#10 Updated by intrigeri 2017-03-18 10:45:03

  • related to deleted (Bug #11736: torsocks complains when used with Monkeysign, but works anyway)

#11 Updated by intrigeri 2017-03-18 10:45:15

  • blocked by Bug #11736: torsocks complains when used with Monkeysign, but works anyway added

#12 Updated by intrigeri 2017-03-18 10:45:28

  • has duplicate deleted (Bug #12091: torsocks prints "Failed to get capabilities of file" to stderr)

#13 Updated by intrigeri 2017-03-18 10:45:41

  • blocked by Bug #12091: torsocks prints "Failed to get capabilities of file" to stderr added

#14 Updated by intrigeri 2017-03-18 10:50:59

Here’s how to trace Git execution:

sudo sysctl kernel.yama.ptrace_scope=0
sudo apt update
sudo apt install strace
strace git clone https://github.com/micahflee/onionshare

#15 Updated by intrigeri 2017-03-18 10:58:11

Creating /etc/mailname that contains localhost fixes the problem. Now investigating with gdb why is that.

#16 Updated by intrigeri 2017-03-18 11:18:21

  • blocks deleted (Bug #11736: torsocks complains when used with Monkeysign, but works anyway)

#17 Updated by intrigeri 2017-03-18 11:18:33

  • % Done changed from 10 to 50
  • Type of work changed from Research to Code

Fixed the 2nd half of the problem on feature/stretch. The 1st part was fixed already yesterday.

#18 Updated by intrigeri 2017-03-18 11:19:09

  • Status changed from In Progress to Resolved
  • Assignee deleted ()
  • % Done changed from 50 to 100