-1

I have a private repo and I want to download a branch files from it. My environment doesn't have the git command installed. It would be great if I can do this with Python/PyGithub

Ernesto Cejas
  • 184
  • 1
  • 6

2 Answers2

1

Do you just want to download files from the repository ? if yes you can copy the files to a local destination.

If you want to checkout the new dev branch off of the repository you an use the UI to do that.

rshdzrt
  • 125
  • 7
0

Your repo is on github, right ?

Through the GUI : when you view the content of a file, you can see a Raw button on the top right part of the file view.

This points you to a url, which will give you the raw content of said file.

Here is an example :

You simply have to download this file, e.g :

curl https://raw.githubusercontent.com/golang/go/master/README.md

For a file in a private repo, you will need to also pass some credentials.

LeGEC
  • 46,477
  • 5
  • 57
  • 104