Script to create and attach a local SSH key to your GitHub account (Python, GitHub API)
- You must have Python 3 installed.
- Once you have Python installed, use the respective
pip
script (oftenpip3
) to install the requests library.
pip3 install requests
Clone a copy of the repo:
git clone https://github.com/jbmanning/git-key
Change to the git-key directory
cd git-key/
All-in-one: Create new ssh id, add to ssh-agent, and upload to your GitHub account.
python3 update-key.py [github username]
It will ask for your password and two-factor auth if you have it enabled.