简体   繁体   中英

Unable to pull / push through git with SSH in RStudio?

I'm not sure what the issue is, since I'd done this without a problem a long time ago.

Basically whenever I try to pull / push through the terminal or RStudio, I'm asked for my username and password (didn't use to be the case). When I supply them, I get an error message saying that this was disabled. It used to be that once my SSH public key was added to Github, things just worked.

I also tried ssh -T git@github.com it worked fine (I got the "Hi [username]. You've successfully authenticated [...]".

I've introduced myself to git, created new keys, registered them with the ssh agent--no luck.

From the terminal, check the URL used:

cd /path/to/local/repository
git remote -v

If it is an HTTPS one, and you want to use SSH:

cd /path/to/local/repository
git remote set-url origin git@github.com:MyAccount/MyRepository

Once that works from command-line, you can switch back to RStudio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM