Invalid Credential Line warning


I recently received an email from Github about updating a repo to use PATs. I did that. I updated the keychain access on my Macbook Pro.

When I go to push my commits to the repo, I get a prompt telling me ‘git-credential-osxkeychain’ wants to use my confidential information in my keychain. I allow it. In my terminal, though, I get a warning message that says
“warning: invalid credential line: [big messy password]” and then it just hangs until I clear the process. Nothing is getting through to my repo.

It seems like it doesn’t like the token keychain but I am unsure how to undo it/fix this issue. Any help would be appreciated!

I had the same issue after switching to PATs.
The following steps resolved it: Updating credentials from the macOS Keychain

Delete the internet password, following the steps in the link above.

Note: Don’t be confused if the token does not disappear from the list after deleting it, at least on my machine the token was still listed even thoung it was deleted. You can confirm that it really is deleted by closing and reopening keychain access.

Now open your command line and enter a command that creates a network request (e.g. git pull or git fetch --all) and you will be prompted to reenter your credentials (Username - your username, password - the PAT).

I hope that this resolves the issue.

1 Like

Thank you! This worked!

Thanks, that solved my problem as well