FriendCode / gittle

Pythonic Git for Humans
Other
732 stars 90 forks source link

fixes https login issue and proxies, urllib2 handler flexibility: #68

Open ghost opened 9 years ago

ghost commented 9 years ago

create authentication object for each repo auth=GittleAuth(https={"repo":repo_url,"username":username,"password":password})

for proxy connection: auth=GittleAuth(proxies={'http': '127.0.0.1',"proxy_type":"proxyurl"})

check: https://docs.python.org/2/library/urllib2.html#urllib2.ProxyHandler for details

if you need to use socks proxy you need to create your own handler python does not have by default or you can use pysocks. https://github.com/Anorov/PySocks

for any other fancy http issue create your handler and have fun.

GittleAuth object is not the best place to implement urllib2 handlers, sorry if i mess up with your interfaces. you can copy it to an appropriate place.