6

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?

Simon O'Hanlon
  • 58,647
  • 14
  • 142
  • 184
  • 2
    This looks like it might be answered by this http://stackoverflow.com/questions/1800859/how-can-i-change-the-remote-target-repository-url-on-windows – jcoder Mar 21 '13 at 10:03
  • But will editing the .git/config file screw up RStudios project information? I will clone another repo and give it a go. – Simon O'Hanlon Mar 21 '13 at 10:06
  • 1
    I don't know as I don't use that. It would suprise me if they duplicated the information but I can't know... As you say, best to try it on another project (or back up yours first) – jcoder Mar 21 '13 at 10:29

1 Answers1

1

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.

vonbrand
  • 11,412
  • 8
  • 32
  • 52