How do you fully revert to HTTPS after setting up

2019-09-18 06:26发布

I am using Visual Studio 2013, and my source control system is Git via Github. While the commandline is fine, I am a GUI man myself. Previously I have had luck with using the Team Explorer pane with Git.

Recently however, our shop has said that they would like to start communicating with Github via SSH. I configured SSH, tested it in the CLI and all was good. It turns out that Visual Studio 2013 uses a libgit2 distribution, libgit2sharp, which does not yet support ssh. Team Explorer, upon trying to commit responds with the following:

An error occurred. Detailed message: An error was raised by libgit2. Category = Reference (Error).
Failed to parse signature - malformed e-mail

I switched BACK to https (via the git remote set-url command) but this does not appear to have worked as far as Visual Studio is concerned. I still get the above error message.

I tried uninstalling and reinstalling git, and re configuring it. I can once again access my repos through the command line and do push pull etc. But VS still insists that my email is malformed and thus I can only conclude that it is still trying to communicate over ssh.

What else must I do to show git that I really really do want to only communicate over https? Or, might there be something else that is confusing it?

Edit

 $ git remote -v
 origin  https://github.com/REPO/PROJECT.git (fetch)
 origin  https://github.com/REPO/PROJECT.git (push)

Obviously the urls have been changed a bit, but they are correct in their structure.

1条回答
SAY GOODBYE
2楼-- · 2019-09-18 06:37

to use https you have to follow these steps

  • git remote add [shortname] [httpurl]

    shortname - short name for your remoteurl(eg:origin, originhttp ..etc)

    httpurl - here you have to provide your remote http url

  • Then you can perform push or pull operation through shortname

    git push shortname master, git pull shortname master.

查看更多
登录 后发表回答