I want to be able to add ssh keys to my GitHub account from a bash script (using curl
).
The documentation points that the best way to authenticate is by using a personal access token.
Following the steps to create a token, I need to specify which scopes it will give me access too. In respect of the "principle of least privilege", I would like it to permit only to add new ssh keys (write).
However, I am not sure which category this fall under. I looked at the documentation of scopes, but could not find any reference to "ssh keys".
Which scope(s) should I use?
The section admin:public_key
is what I was looking for.
In particular the scope write:public_key
.