title: Getting prompted with a GitHub Login Interface whenever I try to push to repo
body: <p>this happened around 3 weeks ago, when they said https connections to GitHub would be removed. That's when this Login UI started popping whenever I tried to push, even though I provided the correct username and password, it said it's incorrect. Then prompted me to type it in bash/terminal, still saying it's incorrect.</p>
  <p>I setup a SSH key and everything was going well, until I tried to push and the same happened again.</p>
  <p>Installed GitHub CLI, setup a brand new repo to test this out, and the problem still persists! Have been searching all over docs and on the internet for the past 3 hours, it's driving me nuts.</p>
  <p>Would like you to provide me with a solution guys. Thanks</p>
  <p>EDIT: I'm running git version 2.26.0.windows.1</p>
  <p>output when <code>git remote -v</code> is typed:</p>
  <pre><code>origin  https://github.com/marjotoska/website-mock-test.git (fetch)
  origin  https://github.com/marjotoska/website-mock-test.git (push)
  </code></pre>
  <p>EDIT2:</p>
  <pre><code>git push
  fatal: The current branch main has no upstream branch.
  To push the current branch and set the remote as upstream, use
  
      git push --set-upstream origin main
  
  git push --set-upstream origin main
  Logon failed, use ctrl+c to cancel basic credential prompt.
  
  </code></pre>
  <p>Then the login UI appears just like this, and even though username and password provided are correct, it doesn't log me in.</p>
  <p>After that UI fail, login from cmd also fails:</p>
  <pre><code>Username for 'https://github.com': marjotoska
  Password for 'https://marjotoska@github.com':
  remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
  remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
  fatal: Authentication failed for 'https://github.com/marjotoska/website-mock-test.git/'
  </code></pre>
  <p>I generated SSH key the way it was intended in the docs: <a href="https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" rel="nofollow noreferrer">https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent</a></p>
  <hr />
  <p>It makes no sense whatsoever that login fails twice, also tried logout-&gt;login from the browser and it works just fine with the same credentials. Is there something to be done here?</p>
  <p>EDIT3: The website (<a href="https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations" rel="nofollow noreferrer">https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations</a>) GitHub devs point to:</p>
  <blockquote>
  <p>What you need to do today.
  For developers, if you are using a password to authenticate Git
  operations with GitHub.com today, you must begin using a personal
  access token over HTTPS (recommended) or SSH key by August 13, 2021,
  to avoid disruption. If you receive a warning that you are using an
  outdated third-party integration, you should update your client to the
  latest version.</p>
  </blockquote>
  <p>I'm using SSH over HTTPS, and the problem still persists.</p>
  <p>EDIT4: Login with Personal access tokens works!!!</p>
  <p>From Github:</p>
  <blockquote>
  <p>Personal access tokens function like ordinary OAuth access tokens. They can be used instead of a password for Git over HTTPS, or can be used to authenticate to the API over Basic Authentication.</p>
  </blockquote>
  <p>PAT is treated as a password, and I used it in place of my password, which pushed the local repo to the remote one</p>
  <pre><code>Logon failed, use ctrl+c to cancel basic credential prompt.
  Username for 'https://github.com': marjotoska
  Password for 'https://marjotoska@github.com':
  Enumerating objects: 27, done.
  Counting objects: 100% (27/27), done.
  Delta compression using up to 8 threads
  Compressing objects: 100% (25/25), done.
  Writing objects: 100% (27/27), 106.63 KiB | 8.20 MiB/s, done.
  Total 27 (delta 3), reused 0 (delta 0), pack-reused 0
  remote: Resolving deltas: 100% (3/3), done.
  To https://github.com/marjotoska/website-mock-test.git
   * [new branch]      main -&gt; main
  Branch 'main' set up to track remote branch 'main' from 'origin'.
  </code></pre>
  <p>SOLVED!</p>