In the following example, I assume the following"
1. Your github account is spencer
2. You want to label your ssh key on github as myLaptop
3. You know how to get your ssh key
Step 1: Connect to the api using curl
curl -u spencer https://api.github.com
Step 2: Post your key
curl -u spencer -data '{"title":"myLaptop","key":"ssh-rsa blahblahblah"}' https://api.github.com/user/keys
No comments:
Post a Comment