Python Forum

Full Version: Download file from Private GitHub rep
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

First of all, I am a Python newbie. I am trying to download a file from private Github repo

import requests
from requests.auth import HTTPBasicAuth
r=requests.get(url="https://dev.xxxxxxxx.com/gitlab/development/xxxxx/-/raw/develop/v6/xxxxx.DatabaseInstaller/Scripts/test.sql",auth=HTTPBasicAuth('[email protected]','mypassword'))
print(r.text)
it returns status code 200 but r.text not brining the actual content, instead an login HTML page with usename and password text box.

How can I get it to work?

Thanks