Project

General

Profile

Bug #12205

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

Added by anonym 10 months ago. Updated 9 months ago.

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

100%

QA Check:
Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

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.

Related issues

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

Associated revisions

Revision b6695097 (diff)
Added by intrigeri 9 months ago

Ship a /etc/mailname file with content "localhost".

Otherwise something (Git? libc6?) tries to resolve the "amnesia" host name,
which fails, and a confusing error message is displayed.

ERROR torsocks[11721]: Unable to resolve. Status reply: 4 (in
socks5_recv_resolve_reply() at socks5.c:683)

Fixes parts of refs: #12205 (which will be fully fixed once #11736 is resolved)

History

#1 Updated by intrigeri 10 months ago

  • 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 10 months ago

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

#3 Updated by emmapeel 10 months ago

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

#4 Updated by intrigeri 10 months ago

  • 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 9 months ago

  • Assignee changed from intrigeri to u
  • Priority changed from Normal to Elevated

#6 Updated by u 9 months ago

  • Status changed from In Progress to Resolved

#7 Updated by u 9 months ago

  • Status changed from Resolved to Confirmed

#8 Updated by u 9 months ago

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 9 months ago

  • 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 9 months ago

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

#11 Updated by intrigeri 9 months ago

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

#12 Updated by intrigeri 9 months ago

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

#13 Updated by intrigeri 9 months ago

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

#14 Updated by intrigeri 9 months ago

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 9 months ago

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

#16 Updated by intrigeri 9 months ago

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

#17 Updated by intrigeri 9 months ago

  • % 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 9 months ago

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

Also available in: Atom PDF