Skip to content

Commit cc5433b

Browse files
committed
fix: github authentication
1 parent 53187f5 commit cc5433b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/github.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ def create_hash_map():
4242
"""
4343

4444
hashmap = {}
45+
from base64 import encodestring as base64
46+
import pwd
47+
login_name = pwd.getpwuid(os.geteuid())[0]
4548
conn = httplib.HTTPSConnection("api.github.com")
49+
conn.request("GET", "/repos/nipy/nipype",
50+
headers={'Authorization': 'Basic %s' % base64(login_name)})
4651
try:
4752
conn.request("GET", "/repos/nipy/nipype/git/trees/master?recursive=1")
4853
except:

0 commit comments

Comments
 (0)