-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More about ssh keys #99
Comments
This allowed me to verify that yes it's the macOS keychain that is managing my ssh key passphrase right now (macOS Mojave 10.14). Launch Applications > Utilities > Keychain Access. Now search for "ssh" or "id_rsa", etc. The relevant entry for me shows up as an application password for SSH and I can, indeed, verify it's managing the passphrase for the key I use on GitHub. https://apple.stackexchange.com/questions/265131/recover-ssh-private-key-passphrase-from-keychain |
Good way to test the ssh connection and get a passphrase prompt: https://help.github.com/articles/testing-your-ssh-connection/
|
I think on macOS, especially if you want git2r to work, you really do need to use ssh-agent. My experiment with not running it is resulting in lots of friction. https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ Key commands for quick access: Start the ssh-agent in the background:
Check if you can access github.com via ssh (can trigger a challenge for ssh passphrase):
|
Finally got my Had/have SSH setup with GitHub from terminal (per Happy Git w/ R and GH docs), specified usethis protocol as SSH, working GitHub PAT, ssh-agent enabled etc. Basically the entire usethis::git_sitrep()
#> Git user
#> * Name: 'Mara Averick'
#> * Email: 'my email address'
#> * Vaccinated: TRUE
#> usethis + git2r
#> * Default usethis protocol: 'ssh'
#> * git2r supports SSH: TRUE
#> * Credentials: '<usethis + git2r default behaviour>'
#> GitHub
#> * Personal access token: '<found in env var>'
#> * User: 'batpigandme'
#> * Name: 'Mara Averick' I ultimately found the solution in the git2r release notes here re. no longer supporting SSH transport by default (breaking change for git2r 0.23.0). To enable, you need to install from source. Though I'd been using the GitHub version, and already libgit2 on my machine (installed using homebrew), this somehow wasn't linking up until I used the suggested: install.packages('git2r', type='source', configure.vars='autobrew=yes') This didn't actually reinstall libgit2 from homebrew, though it would have been allowed, if it hadn't been on my computer. System info:
@jennybc — just let me know if this is the wrong place, or useless or whatever! |
Building up to better coverage of ssh keys in general and, specifically, getting git2r to work well. These notes are likely macOS specific.
What keys are currently registered with the ssh agent?
See the RSA key fingerprint for a local key in order to, say, match it up against a key on GitHub.
https://stackoverflow.com/questions/9607295/how-do-i-find-my-rsa-key-fingerprint
Probably important, in terms of understanding behaviour I see on my Mac:
The text was updated successfully, but these errors were encountered: