You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter_tool gets stuck silently if git asks for passphrase #184309
For example a situation when ssh-agent was not running properly, which will cause git to ask for passphrase for id_rsa.
When building flutter_tool snapshot, the flutter_tool is ran during snapshot generation. This calls
git fetch --tags
When ssh agent is not running, the git fetch --tags never completes because it is asking for passphrase, which means that flutter_tool also never completes and the snapshot is never generated. The flutter_tool appears stuck without any error message.
changed the title [-]flutter_tool gets stuck if git asks for password[/-][+]flutter_tool gets stuck without any error message if git asks for password[/+]on Mar 29, 2026
changed the title [-]flutter_tool gets stuck without any error message if git asks for password[/-][+]flutter_tool gets stuck without any error message if git asks for passphrase[/+]on Mar 29, 2026
changed the title [-]flutter_tool gets stuck without any error message if git asks for passphrase[/-][+]flutter_tool gets stuck silently if git asks for passphrase[/+]on Mar 29, 2026
Apologies, "fetch tags" only happens with --version, during snapshot generation when the tool is ran without arguments and there is no cached version info (cache/flutter.version.json), there are other git invocations:
@bkonyi, Im wondering if it would be a good idea to have special argument for flutter_tool used during snapshot compilation where it would exit early minimizing chances of hanging.
Activity
[-]flutter_tool gets stuck if git asks for password[/-][+]flutter_tool gets stuck without any error message if git asks for password[/+][-]flutter_tool gets stuck without any error message if git asks for password[/-][+]flutter_tool gets stuck without any error message if git asks for passphrase[/+][-]flutter_tool gets stuck without any error message if git asks for passphrase[/-][+]flutter_tool gets stuck silently if git asks for passphrase[/+]knopp commentedon Mar 29, 2026
There should probably be a command line argument passed when generating snapshot that would make to tool to exit early.
bkonyi commentedon Apr 1, 2026
Thanks for the report @knopp. Do you have any logs or pointers to the exact invocation of
git fetch --tagswithin the tool?knopp commentedon Apr 1, 2026
Apologies, "fetch tags" only happens with --version, during snapshot generation when the tool is ran without arguments and there is no cached version info (cache/flutter.version.json), there are other git invocations:
flutter/packages/flutter_tools/lib/src/version.dart
Line 1017 in 0201778
During initial snapshot generation when there is no precached verison information this function runs some git invocation, which may silently hang.
Fix background git fetch hanging silently when asking for an SSH pass…
Fix background git fetch hanging silently when asking for an SSH pass…
knopp commentedon Apr 28, 2026
@bkonyi, Im wondering if it would be a good idea to have special argument for
flutter_toolused during snapshot compilation where it would exit early minimizing chances of hanging.