2

Sometimes

git clone https://bitbucket.org/private/repo

results in error:

Cloning into 'repo'...

error: failed to execute prompt script (exit code 1)

fatal: could not read Username for 'https://bitbucket.org': Invalid argument

And sometimes it triggers username input prompt.

Even if user name is specified, sometimes

git clone https://username:bitbucket.org/private/repo

results in error:

Cloning into 'repo'...

error: failed to execute prompt script (exit code 1)

fatal: could not read Password for 'https://username@bitbucket.org': Invalid argument

And sometimes it triggers password input prompt.

git clone https://username:password@bitbucket.org/private/repo

works every time, but I'm trying to avoid providing the password in readable form.

It seems that Git has some kind of a session that prevents it from showing the prompt before it expires, but I had no hard proof of that.

Are there sessions in Git that affect these prompts, and how can they be purged?

How can I make this prompt being displayed every time?

git clone https://bitbucket.org/private/repo
Cloning into 'test'...
Username for 'https://bitbucket.org': username
Password for 'https://username@bitbucket.org':

I'm using Git for Windows 2.13. I believe the issue isn't specific to current repository (Bitbucket), it occurred with other repositories too.

There are several questions that refer to these errors, but the answers aren't applicable to this situation.

Estus Flask
  • 206,104
  • 70
  • 425
  • 565

1 Answers1

1

First, check if the issue persists with Git 2.17 for Windows: the credential helper (git config credential.helper) should be "manager", and it has fixed a lot of bugs since 2.13

If you want to be asked for credentials every time, you can prevent the caching of those credentials with:

git config --global unset credential.helper
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I appreciate the answer, this could be the issue. I will have a chance to check how this works in a short time. – Estus Flask Apr 05 '18 at 07:04