Problems with github credentials when pulling from private repositories

When I try to pull from a private repository, authentication fails with remote: Invalid username or password.

More specifically, I take the following steps:

In the dropdown menu on the New Project button on, I select "New Project from Git Repository". (I have github authentication enabled also for private repo access under This works fine for private (and of course also public) github repositories.
For private repositories (I am the owner), I am asked for my credentials when I want to pull from the remote github repository (which fails as described above).
Of course, the username and the password are the same that I had to indicate when I enabled github access in the authentication section of my settings in rstudio cloud.

When the repository is public pulling and all other github interactions work just fine.

Am I missing something obvious? Thanks for your help!

Are you able to successfully pull from that repo using the same credentials? Once the project has started, we don't do anything special with the interactions with git. Are you prompted for both your username and your password?


Is there somewhere outside of that you can use to test that the credentials you are using are valid?

Do you have two factor auth enabled on your account?


If you do have two factor auth enabled on your account, you can use a personal access token. More details are found here:


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Sorry, reading my comment, i realize I left out a few important words. What I meant to ask was if you are able to pull from that repo from your local machine using the same username and password?


Thanks for your reply. The reason why I'm writing is that I am not able to successfully pull from private repos. Yes, I am prompted for both username and password.

Yes, everything works fine on my local machine. I do not type in my username and password though because I use SSH keys.