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
Error authenticating in usethis::create_from_github()
#711
Comments
|
This is exactly why the #> usethis + git2r
#> * Default usethis protocol: 'ssh'
#> * git2r supports SSH: TRUE
#> * Credentials: '<usethis + git2r default behaviour>'I'm afraid this doesn't assure you that git2r can find your credentials, it just means you're sending the default So you are one of the people who may need to explicitly create a credential, just as you successfully do above, and cache it for entire sessions via Alternatives include: not having an SSH passphrase on your keys or using HTTPS. It is on the usethis roadmap to switch to the credentials package, internally, so that we have more control and visibility into this process. Right now, we are flying blind when git2r doesn't discover SSH keys and/or can't obtain the passphrase. |
|
I will say that it sounds like the SSH passphrase is what git2r is failing to obtain automatically. So you might want to look into your configuration there, because most people are able to get git2r working with SSH on macOS (less true on Windows). Section 11.4.3.1 here has some guidance on configuring ssh-agent + keychain to manage the SSH passphrase on macOS: https://happygitwithr.com/ssh-keys.html#create-an-ssh-key-pair |
|
I apologize for this is a naive comment, but thought I would share in case someone could make something of these observations. I have been dealing with these precise problems for the past couple of hours on my Mac running Mojave 10.14.4. I have been scrupulously following the guidelines from https://happygitwithr.com/ssh-keys.html without success. While I was able to connect to git via ssh using the shell without difficulties, I was unable to use any functions within R that depended on git2r. I noticed that, when creating ssh keys in the shell and subsequently adding them to the ssh-agent via |
There appears to be a problem when authenticating with a password protected ssh on macOS Mojave (10.14.4). Not sure if this is a problem in usethis, git2r, or my local setup. When I try to
create_from_githubI get the following error:Created on 2019-04-11 by the reprex package (v0.2.1)
This occurs for other GitHub related functions as well (e.g.,
use_github). As far as I can tell, git2r is set up correctly:Created on 2019-04-11 by the reprex package (v0.2.1)
If I specify my credentials, I get prompted for my password, but then things work as expected:
Here is some additional session information that may be helpful:
Created on 2019-04-11 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: