sigmavirus24 / github3.py

Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.
https://github3.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.21k stars 402 forks source link

Two-factor auth doesn't use the proxy #233

Closed seveas closed 10 years ago

seveas commented 10 years ago

Strace output, irrelevant details trimmed

dennis@seahawk:~$ strace -f -econnect git hub whoami
GitHub password: 
[pid 29599] connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
[pid 29599] connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.1.1")}, 16) = 0
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.182.10.3")}, 16) = 0
[pid 29599] connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.192.10.3")}, 16) = 0
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.182.10.3")}, 16) = 0
Two-Factor Authentication Code: 515449
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.1.1")}, 16) = 0
[pid 29599] connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("192.30.252.138")}, 16) = -1 ETIMEDOUT (Connection timed out)

So the first request uses the proxy defined in my environment, but the second one, with the OTP response, does not.

seveas commented 10 years ago

I don't know what happened, but this is suddenly working again.