skip to Main Content

when executing the flutter pub get command, I get the following error.

Git error. Command: `git clone --mirror https://github.com/Test/test.git /Users/user/.pub-cache/git/cache/test-e3750ea6bfc4e9b45a0923`
stdout: 
stderr: Cloning into bare repository '/Users/user/.pub-cache/git/cache/test-e3750ea6bfc4e9b45a0923'...
fatal: could not read Username for 'https://github.com': Device not configured
exit code: 128

That is, the problem is when I try to get a package using git like this:

file pubspec.yaml

  test:
    git:
      url: https://github.com/Test/test.git

I specified the username and email for git through the console

Please help me, I have already tried everything and nothing helps(((

2

Answers


  1. Chosen as BEST ANSWER

    I fixed it as follows: I manually copied this library as a new project via git clone. It was copied and then I re-launched the flutter pub get command in the old project and everything worked successfully


  2. I’m guessing you are doing this from within Android Studio?
    Go to File -> Settings -> Git
    And then in the bottom check the Credentials Helper check box.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search