0

When I try to push my code to an existing GitHub repo, it shows the below error:

Command:

git push

Result:

warning: could not find UI helper 'GitHub.UI'
Select an authentication method for 'https://github.com/':
  1. Web browser (default)
  2. Device code
  3. Personal access token
option (enter for default):

Which authentication method should I choose and how I push my GitHub repository?

Azeem
  • 11,148
  • 4
  • 27
  • 40
  • Hi! Please add the details of your environment to your question. What happens when you press ENTER? From the first look, it seems like you haven't configured `git` on this machine. – Azeem Jan 12 '23 at 16:18
  • See https://stackoverflow.com/q/74778511/761095 – bahrep Jan 12 '23 at 17:21

1 Answers1

1

I assume that you are using Git for Windows client. In this case make sure that you are using the latest version. There was a relevant fix in Git for Windows 2.39.0(2):

The Git Credential Manager version shipped with Git for Windows v2.39.0 could not always find its UI helper which was fixed by upgrading to a fixed version.

And to answer your question:

Which authentication method should I choose and how I push my GitHub repository?

Choose the default method "Web browser". Normally, a web browser should open GitHub and prompt you to authenticate the client. It's more convenient than having to generate and enter your personal access token (PAT).

bahrep
  • 29,961
  • 12
  • 103
  • 150