1

We have a new corporate password complexity/length policy and ever since changing to that policy I can't use git to talk to GitHub Enterprise from the command line or from the IDEs that depend on the CLI version (such as Visual Studio and NetBeans). However, I can use GitHub Desktop to do my git tasks just fine.

The CLI and IDE always prompt me for my password, but then reject me with a standard "fatal: Authentication failed for..." message. Same password in GitHub Desktop works fine.

Our new passwords are 25 characters minimum, is there a limitation on how long of passwords that git CLI supports?

Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92

1 Answers1

1

Is there a limitation on how long of passwords that git CLI supports?

No that I know of.

The CLI and IDE always prompt me for my password, but then reject me.

Check from the CLI:

  • if the remote is indeed an https one (git remote -v)
  • what is the credential helper: git config credential.helper: it could have cached the old credentials.

Check and see if 2 factor authentication is turned on. If so, create a personal access token. Use that in place of the password.

Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It's https. Credential helper is "manager", which I take it is the window popup I get requesting my username/password when I run git from the command line. – Brian Knoblauch Dec 01 '17 at 19:10
  • @BrianKnoblauch Exactly: see https://stackoverflow.com/a/47466980/6309 or https://stackoverflow.com/a/46679813/6309 – VonC Dec 01 '17 at 19:12
  • No matching entry in the Windows Credential Manager for that repo. The only thing even remotely git related was for our GitHub API, so removed it, but no change. – Brian Knoblauch Dec 01 '17 at 19:18
  • Now, when the popup request your username/password, can you enter it successfully? Or is it rejected? – VonC Dec 01 '17 at 19:25
  • @BrianKnoblauch and does your password has any special characters? – VonC Dec 01 '17 at 19:26
  • Rejected the same way. It does have special characters, but nothing I haven't used before and been OK with using git CLI. – Brian Knoblauch Dec 01 '17 at 19:51
  • 1
    @BrianKnoblauch Still, just for testing, try and percent encode those characters: https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters – VonC Dec 01 '17 at 19:52
  • Strange. The remote url does start with https://... right? (not `git@xxx`). And it does not include a username? (as in https://username@github.com/...) – VonC Dec 01 '17 at 20:17
  • Can you make the same git command in the CLI, but first with `set GIT_TRACE=1` and `set GCM_TRACE=1`. Are you behind a proxy? What version of Git are you using? – VonC Dec 01 '17 at 20:59
  • Ugh, 2 factor authentication got me... Apparently that was turned on as well. I added it to your answer to complete the sequence. – Brian Knoblauch Dec 04 '17 at 16:36