Getting an error from "Pub get" on android studio

Viewed 578

I recently updated dart and flutter and after that I am getting this error when trying Pug Get:

C:\flutter\flutter\bin\flutter.bat --no-color pub upgrade
Resolving dependencies...
Git error. Command: `git fetch`
stdout: 
stderr: fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Unknown error

exit code: 128
pub finished with exit code 69
Process finished with exit code 69

I am not sure how to fix this? thank you in advance!

2 Answers

There is an issue with the URL to one of the packages in your pubspec. You can see more info on which repository is giving the error by running flutter pub get -v.

This occurred to me as Github has removed git native transport via git://. I had to change my git pubspec entries to

package_name:
  git: 
    url: https://github.com/Sub6Resources/flutter_html.git

flutter pub upgrade

flutter pub get

These command needs to be run from inside a project folder, not from inside the folder flutter\bin\, where the flutter installation lives.

Related