- Change
OLD_USER
to the current owner of the repositories to transfer. - Change
NEW_USER
to the new owner. - Change
REPOS
to be an iterable of repository names (str
) to transfer. - Transfer one repository normally through the web browser, because you need to type your password once (this only lasts for a few hours).
- Extract cookies from the browser after signing into GitHub. Save in Netscape format in
cookies.txt
in the same location as the script. On every line incookies.txt
that starts with 'github.com' change it to '.github.com'. python gh-transfer.py
because the API does not have this feature!
You can extract cookies from Chrome in Netscape format with EditThisCookie.