Mac OS: Android Studio Preferences -> Git -> at bottom, Use Credentials helper (make sure it is checked)

Windows: Android Studio File -> Settings -> Git -> Check Credentials Helper at bottom

answered Apr 16, 2022 at 15:06

3

You get that error (fatal: could not read Username for 'https://github.com': Device not configured) when git needs vĩ đại ask for a username or password and (a) the only mechanism available vĩ đại it is vĩ đại ask on the console and (b) there is no console available (git is not attached vĩ đại a tty device, i.e., you're not running git interactively).

This commonly happens in an environment where you are invoking git from some sort of gui tool and no appropriate credentials helper has been configured.

There are a variety of ways of addressing this problem:

  • One of the easiest is vĩ đại move vĩ đại using ssh authentication rather kêu ca https.

  • You could hardcode the credentials for github into your local git repository, as described in the gitcredentials documentation.

  • You could configure an appropriate helper application. One may already be configured, but git may simply not be able vĩ đại find it. The gitcredentials man page has information on this option as well.

answered Oct 27, năm 2016 at 1:39

8

I just closed Android Studio and started it again. The problem is fixed.

answered Aug 24, 2022 at 12:53

2

What solved it for bu was this:

  1. I restarted apk studio
  2. I ran flutter pub get
  3. Github then asked bu for my username and password. I entered them. The password I entered was my github access token, not my actual github password.

Hope it helps someone.

answered Jun 29, 2023 at 21:25

1

@codrus's comment helped bu fixing the issue on sourcetree Go vĩ đại Preferences -> tab Git -> section Git version -> button Use System Git, and select from the dialog 'git'.

answered Sep đôi mươi, 2021 at 12:26

This Gist helped a lot! Just 3 commands.

answered Oct 3, 2022 at 19:08

1

Check this option in Android Studio File -> Settings -> Git -> Credentials Helper

If its not working even after checking 'Credentials helper' in settings then only restart the Android Studio and try vĩ đại push code again.

answered Aug 19, 2022 at 8:47

I restarted the Android Studio and it worked for me

answered Aug 31, 2022 at 12:36

In my case I cloned the repository with ssh, but pub get was still using https, so sánh I forced git vĩ đại use ssh with: git config --global url."[email protected]:".insteadOf "https://github.com/"

On Mac Updating keychain access entry for github worked for bu.

refer this answer for details on how vĩ đại update keychain access entry.

answered Aug 23, 2022 at 12:44

This should help solve this problem, since tư vấn for password authentication was removed on August 13, 2021.Please tải về and instal Git Credential Manager: https://github.com/GitCredentialManager/git-credential-manager/releases/tag/v2.0.785 Then you can use Android Studio and push all changes. After push Git Credential Manager will ask you for validation, and all should works perfect after all.

answered Aug 23, 2022 at 14:34

If you are on google colab, running the clone command on the terminal instead of the notebook will, most probably, tự the trick.

answered May 14, 2023 at 16:14

For bu, just install Github client for Mac fixed the issue.

answered Jul 1, 2022 at 21:30