0

I'm switching to using Git instead of Mercurial, and am using Bitbucket for my remote repository. I have things largely working now, except for my credentials for connecting to the remote repo from a different server (with a different username). I cloned the repo with git clone https://person@bitbucket.org/myprojects/myproject.git to my other server. But I don't actually want to connect as user 'person' from that server, there is a different username I want to connect as, and I want to be prompted for it. With Mercurial, I could in effect miss out the person@ and I would be prompted each time (which is what I want). But if I do that with Git, I get a message saying error: The requested URL returned error: 401 Unauthorized while accessing [the repo]. So how do I do this with Git?

[LATER: Beginning to think this might be an issue to with the version of Git I'm using on that server, 1.7.1. I'll try to update and see where I get to]

John Moore
  • 6,739
  • 14
  • 51
  • 67
  • Possible duplicate of [Git: force user and password prompt](https://stackoverflow.com/questions/14643308/git-force-user-and-password-prompt) – EternalHour Sep 02 '19 at 19:25

1 Answers1

0

Turned out to be a Git version issue, as mentioned above. Updating from 1.7.1 to 2.22.0 solved the problem.

John Moore
  • 6,739
  • 14
  • 51
  • 67