0
votes

I am using TortoiseGit 2.4.0.2 on Windows 7 Enterprise. I installed it a couple months ago and all was working fine. It's storing my HTTP credentials (Git -> Credentials -> manager - all Windows users), so I don't have to retype my password every time I interact with it.

Today, in preparing to help some folks get started with git, I tried to clone the repository I've been working with in a new place (i.e. create a fresh sandbox to teach in). I got the HTTP URL from BitBucket and used Clone through the GUI (right-click, "Git Clone..."), specifying a new directory. It asked me for a password, which I know to be correct, but failed with "fatal: Authentication failed" in the GUI. Not much more in the action log:

7/18/2017 - 10:21:37 AM - C:\doc-git\test\doc-test
git.exe pull --progress -v --no-rebase "origin"

fatal: Authentication failed for 'http://[email protected]/scm/docs/doc-test.git/'

git did not exit cleanly (exit code 1) (32542 ms @ 7/18/2017 10:21:29 AM)
User cancelled

("User cancelled" happened after the GUI presented the error; my choices where "cancel" and "abort" and I chose the latter. Previously I'd tried "cancel" and it left a process running that interfered with later actions.)

I then headed to a Cygwin command line in a new directory and did a git clone with the same URL (git version 2.7.0). It prompted me for a password, accepted it, and cloned the repository. However, if I try to then interact with that clone using TortoiseGit, I again run into the password problem.

I notice that the Bitbucket HTTP URL includes the user name (https://[email protected]...), so strictly speaking the client shouldn't need to ask for it. And command-line git doesn't, but TortoiseGit does. So I tried omitting the user name, but that didn't work either.

How do I get past the problem using TortoiseGit? I can just use the command line, but I'm getting ready to teach some GUI-dependent people how to interact with this repository and I'd like to verify that they'll be able to clone it. Does the fact that I've used TortoiseGit to clone this repository more than once (in different locations) matter? I didn't think git would care; in the past I've cloned the same repo (not this one) on different machines, but never twice from the same client before.

Switching from HTTP to SSH isn't an option for us, I've been told. Besides, I'm trying to make this dirt-simple for people (aside from it being git :-) ), and key management adds complexity.

1
You could try another GUI. tortoisegit uses libgit2, which is git re-implementation, it might be related.max630
@max630 the people I'm migrating to git currently use Tortoise SVN, so there's a strong preference for Tortoise Git to ease their transition.Monica Cellio
"fatal: Authentication failed" is not enough. Could you go TotoiseGit -> Settings -> Saved data -> Action log -> push "Show" button, and copy/paste more error message here?Yue Lin Ho
Do you use Cygwin git or Git for Windows? And which version of git?Yue Lin Ho
@YueLinHo there's not much more in the log, but I've edited it in. (Thanks for pointing me to that; didn't know about the log.) I added the git version number as obtained from the Cygwin command line.Monica Cellio

1 Answers

1
votes

I notice that the Bitbucket HTTP URL includes the user name (https://[email protected]...), so strictly speaking the client shouldn't need to ask for it. And command-line git doesn't, but TortoiseGit does.

Yeah~ should not ask for name...

Try if this help (remove the credential first, then clone again):

  1. Windows Start -> keyin "cred" -> click Manage Your Credentials

    enter image description here

  2. Remove BitBucket credentials from manager

    enter image description here

  3. Clone (using the URL with user name)

    enter image description here

  4. Should pop BitBucket asking-password dialog

    enter image description here