Search code examples
gitauthenticationfork

Can't push to forked repo, authentication failed


So I forked public repo django-oscar, and am trying to push my changes for the purposes of a PR.

Every time I try to push to my fork I get this window:

enter image description here

After entering my github creds I get this error back in my terminal: Logon failed, use ctrl+c to cancel basic credential prompt.

  1. I know I'm using the correct username and password in the prompt, because I can use those creds to login into github normally via a browser and view the repo.
  2. I've used git remote -v and checked that I'm targeting the right repo.

I'm on a windows machine. Any idea on how to resolve this? Anyone had this before? My current thought process is that something on the repo is demanding a strange cred, due to the fact I forked it instead of starting a repo on my own.

I've also tried using a personal access token as a password, but no dice.


Solution

  • All good answers, but in the end the issue was a VSCode extension that was interfering with the push. I didn't think, this could be the case because I was using the terminal and not the extension, but it was in fact the cause. I believe it may have been intercepting the call back from the popup window that had me log into in GitHub (..but I can't be sure). Anyway, after playing around with the extensions setting in VSCode and restarting my machine, the push worked.

    Hopefully this may save someone time in the future.