OS: Arch Linux
Using git2r in usethis::create_from_github():
Error in git2r::clone(origin_url, normalizePath(repo_path, mustWork = FALSE), :
Error in 'git2r_clone': error authenticating: failed connecting with agent
However, when specifying the credentials explicitly, everything works:
cred <- git2r::cred_ssh_key(
publickey = "~/.ssh/id_rsa.pub",
privatekey = "~/.ssh/id_rsa"
usethis::create_from_github("<repo>", destdir = "~/git", credentials = cred)
My ssh-agent is running and I've added the ssh key to the agent.
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-BAHgeA39uy66/agent.6961; export SSH_AUTH_SOCK;
SSH_AGENT_PID=6962; export SSH_AGENT_PID;
echo Agent pid 6962;
OS: Arch Linux
Using
git2rinusethis::create_from_github():However, when specifying the credentials explicitly, everything works:
My
ssh-agentis running and I've added the ssh key to the agent.