it:ad:git:howto:retarget_a_repository_from_git_to_https_protocol

IT:AD:Git:HowTo:Retarget a Repository from GIT to HTTPS protocol

Summary

The situation is probably something akin to:

  • you've just followed the bitbucket.org instructions on how to start with a new project:

git remote add origin git@bitbucket.org:<accntname>/<yourreponame>.git

  • you actually went through the trouble of installing SSH (well done)
  • you committed and push'ed something from the command line, and it worked (yay)
  • you then committed something from IT:AD:Visual Studio, and tried to Commit it, and it didn't work (poo), probably getting an error message similar to:

An error was raised by libgit2. Category = Net (Error).
This transport isn't implemented. Sorry

What's going on is that Visual Studio 2013's Git solution only handles HTTPS: * http://www.hanselman.com/blog/GitSupportForVisualStudioGitTFSAndVSPutIntoContext.aspx

  • Go back to bitbucket's repo's page: https://bitbucket.org/<nameofrepoowner>/<nameofrepo>
  • From top right of screen, get the repos's url by changing the dropdown – eg:
    • from: git@bitbucket.org:<nameofrepoowner>/<nameofrepo>.git
    • to: https://<youraccountname>@bitbucket.org/<nameofrepoowner>/<nameofrepo>.git
  • Open a IT:AD:CLI or IT:AD:Powershell interface

cd <yourrepodir>
git remote set-url origin https://<youraccountname>@bitbucket.org/<nameofrepoowner>/<nameofrepo>.git

  • /home/skysigal/public_html/data/pages/it/ad/git/howto/retarget_a_repository_from_git_to_https_protocol.txt
  • Last modified: 2023/11/04 22:58
  • by 127.0.0.1