0

github enterprise, windows 10. email+token only works with github desktop tool. Fails in powershell, git bash, and cmd consoles.

Error - remote: Repository not found. fatal: Authentication failed for https://(enterprise hostname)/(org name)/(repo name).git

ran test scenario: created new repo on github site, path used was from clone link. used sample code to generate readme.md, git add . (success); git commit -m "notes" (success); git push -u origin master (failed)

git config --system contains "config.helper=manager" (GCM)

The GCM popup prompts for credentials (enter email; token), connection fails, also github is not added to windows credential manager.

The GCM prompts for credentials (cancel), command line prompts for username (email) and password (token), connection fails

cmd runas admin

git config --system --unset config.helper (no effect)
git config --system config.helper=wincred (no effect)
git config --system config.helper=cache (no effect)
git config --system --list (still shows "config.helper=manager")

tried removing origin and resetting, no effect

git exists in several locations on my machine:

  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git
  • C:\Program Files\Git
  • C:\Users{username}\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db

Github desktop --> options: Able to add github enterprise login successfully: Email or usename; token; https://(enterprise hostname) able to "sync" successfully

I am the creator and owner of both the organization and the Repo. All of this was working from windows 7, I just did a new install of windows 10 and generated a new token, trying to pull down my repos and get them into a usable state.

did a lot of research, tried several things, not sure what else to try, really need commandline interface to work. Any suggestions, greatly appreciated.

1 Answers1

0

I ran through the following steps(below) and was able to isolate the issue to either the GCM or the way I was attempting to use it. Specifying the older tool "wincred" resolved my issue.

[Installer: Microsoft Git Credential Manager for Windows setup v 1.9.0]

  • Removed GCM install
  • Removed Git Windows Install
  • Remove local git directories
  • Removed GitHub Desktop
  • generated new token

installed GIT windows with GCM ran a cloning test - GCM popup, entered email + token - auth failed removed git for windows re-installed without GCM ran a cloning test (git bash) - cmd line prompts for use/pwd clone suceeded removed local repo


installed Github desktop authenticated with email+token cloned from remote repository into local success closed GitHUb Desktop, removed local repo


ran git bash cloned remote repo - cmd line prompts for use/pwd clone suceeded closed Git bash, removed local repo


installed standalone GCM git config --global credential.helper manager ran git bash cloned remote repo (Failed) remote: Repository not found. fatal: Authentication failed for (clone url)

uninstalled GCM git config --global --unset credential.helper removed local repo


ran git bash git config --global credential.helper wincred cloned remote repo - cmd line prompts for use/pwd clone suceeded updated readme.md git add, git commit, git push -u origin master (success) noted git added to windows credentials / generic credentials in Credential manager. Address stored as git:https://(username)@github...


Since git entry is now in Credential Manager, lets give GCM another try

installed standalone GCM git config --global credential.helper manager

made a change to readme.md git add, git commit, git push (failed) remote: Repository not found. fatal: Authentication failed for (clone url)

uninstalled GCM git config --global --unset credential.helper


reset to wincred

git config --global credential.helper wincred git add, git commit, git push (success)

Looks like the problem for me was microsoft's GCM or the way I was trying to use it.