Skip to content

fix: use git config --add for token insteadOf rewrites#76

Merged
yash-garg merged 1 commit into
mainfrom
fix/git-insteadof-add
Jun 10, 2026
Merged

fix: use git config --add for token insteadOf rewrites#76
yash-garg merged 1 commit into
mainfrom
fix/git-insteadof-add

Conversation

@nikzen

@nikzen nikzen commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • git config url.<base>.insteadOf <value> without --add overwrites the previous value for the same url base key. Our three rewrites in dart-prepare therefore collapsed into a single one — only the last (ssh://git@github.com/) survived.
  • As a result, https://github.com/... git dependencies were not rewritten to the token URL, and flutter pub get failed with fatal: could not read Username for 'https://github.com' (see e.g. famedly/app#7173).
  • Fix: use git config --global --add so all three insteadOf mappings (https://, git@, ssh://) coexist under the same base.

Plain `git config url.<base>.insteadOf <value>` overwrites the previous
value for the same base key, so only the last rewrite (ssh://) survived
and https:// dependencies were not rewritten, causing
"could not read Username for 'https://github.com'" during pub get.
@yash-garg
yash-garg merged commit a33fe46 into main Jun 10, 2026
1 check passed
@yash-garg
yash-garg deleted the fix/git-insteadof-add branch June 10, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants