Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Git protocol for RStudio project already under version control in Windows

I love using RStudio for it's built-in integration with version control systems. However with RStudio on Windows is there a way to change the Git protocol from http to ssh or vice versa for a project already under version control without first having to delete and recreate the project?

I might be missing something, but I originally cloned my repo using http which I subsequently found to be a massive pain because every time I want to push project changes to GitHub I have to re-enter my username and password. So I removed the project from version control(Project -> Project Option -> Git/SVN -> Version Control System: none) and then tried to re-add version control hoping to use ssh but it will only allow you to go back to the original protocol you selected when creating the project in the first place.

The only way I have found to change protocol it is to delete the project and then create a new project from GitHub using the correct ssh parameters. I'd really like to be able to change projects version control protocol from http to ssh without deleting and re-cloning first.

Is this possible?

like image 546
Simon O'Hanlon Avatar asked Mar 21 '13 09:03

Simon O'Hanlon


People also ask

How do I link Git to RStudio?

In RStudio Select File > New Project.., select Version Control, Choose Git, then provide the repository HTTPS link, select the R workspace folder and create the project. RStudio now copies (clone in Git terms) the content of the repository to your project folder.

Where is the Git tab in RStudio?

Once the project has been created, the Git tab is now visible in the upper right quadrant of RStudio. See also Version Control with Git and SVN on the RStudio support website.


1 Answers

Check out git config and the whole configuration stuff. You can configure several remotes to make the "distributed" aspect of git work.

You can try just copying the whole repository (or just .git/config, keep a copy!) and check what happens with your specific case when you change the configuration. It depends on lots of things that aren't under git's control, like firewall configurations en route, and the configuration on the other end.

like image 123
vonbrand Avatar answered Oct 07 '22 00:10

vonbrand