Struggling to get token based access to work

OK so I have a token, and I’m trying to use it in my Windows Git bash client.

If I type this

git push

– I get sent to the logon screen - which of course now no longer works, so I’ve tried a bunch of things but for example this:

git push https://github.com/LindonAtChannelRobot/OTS.git Username:LindonAtChannelRobot Password: my token string

this tells me:

error: src refspec Username does not match any
error: src refspec Password does not match any
error: failed to push some refs to ‘https://github.com/LindonAtChannelRobot/OTS.git

I know this is my user name and I’m copying the token string I have saved

I thought perhaps my refs were wonky but I get this:

git show-ref
1fa828e7b701552406020b1859cff9fe18f5c08b refs/heads/master
6c6413fee79322ce10d9176635d836de1fbeca09 refs/remotes/origin/master

Any help much appreciated.

…and I have a work around already…for anyone else stuck on this:

git credential-manager uninstall --force

– will remove the credentials-manager that forces me to use the login-window, and then when I retry a git command e.g. git push, I get separate dialogs for user name and password which work correctly…

1 Like

Thank you @LindonAtChannelRobot for sharing your workaround with us.