Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support grammars in private repositories / repositories accessed via Git+SSH #776

Closed
Niols opened this issue Oct 23, 2024 · 1 comment · Fixed by #777
Closed

Support grammars in private repositories / repositories accessed via Git+SSH #776

Niols opened this issue Oct 23, 2024 · 1 comment · Fixed by #777

Comments

@Niols
Copy link
Member

Niols commented Oct 23, 2024

Is your feature request related to a problem? Please describe.

When using Topiary and the newly-added dynamic support of grammars, and when I try to access a private repository (or any repository via Git+SSH), I get the following error:

[2024-10-23T09:38:46Z ERROR topiary] Error Fetching Language: Git(Error { code: -16, klass: 23, message: "authentication required but no callback set" })

My supposition is that Git tries to authenticate, finds a valid public SSH key, but my private SSH key has a password, and Git doesn't know where to request the unlocking of the key.

Describe the solution you'd like

Topiary should gracefully forward authentication to whatever mechanism the user uses. I have no idea how this works, so I cannot give details, but other utilities that rely on Git manage to trigger my password manager to unlock my SSH key properly. I suppose it might be something like passing the right terminal handle to the underlying Git process? 🤷

Additional context

In fact, in my case, I was not trying to access private grammars, but my git configuration contains

[url "ssh://[email protected]"]
	insteadOf = "https://github.com/"

leading to SSH authentication also to download public repositories.

@Niols
Copy link
Member Author

Niols commented Oct 23, 2024

Apparition of the issue:

$ git bisect start 'main' 'v0.4.0'
89e9002 bad release: version 0.5.0 (#774)
ba4f440 good release: version 0.4.0

$ git bisect bad b4a842673b2849fd1efef23df39cc25e26a352c8
b4a8426 bad Merge pull request #735 from tweag/nb/ocaml_misc

$ git bisect good 6be487b37f719b08b41cd13e6e3aa58756423cb4
6be487b good Merge pull request #720 from jonsterling/fix-719

$ git bisect skip 66c1e81c6b4ea175452f21fceebe50d81d9ad4aa
66c1e81 skip feat(config): embed TARGET triple via build.rs

$ git bisect skip 967a80513ea54bbf44a84381e08fa186cc203914
967a805 skip fix(config): add subdirs to ocaml and ocaml_interface

$ git bisect bad b81522f272416069d7716cf45c12f8453a4394de
b81522f bad chore: flake update

$ git bisect good a8bc7e567c4e46ace040b0fbd0a581502f35c82e
a8bc7e5 good Update CHANGELOG

$ git bisect bad 9e476d1a45fd8e267f6b464b67b8554735a3954f
9e476d1 bad chore: update CI to test non-nix compatible tests

$ git bisect skip 04315d920cbd8fd51f20390bd93d2f2a070ff681
04315d9 skip feat(config)!: fetch tree-sitter grammars and compile them

$ git bisect good ab2b28aee6a7dceedf227dc95d676806abca5c85
ab2b28a good build(deps-dev): bump axios from 1.6.6 to 1.7.7 in /web-playground

$ git bisect bad 6d0a86998e7fe8a26d40a7320229749b7e84d18e
6d0a869 bad feat!: update tree-sitter

$ git bisect good 92f4bb90649068122c6d50c091433c6e2291cc89
92f4bb9 good Merge pull request #733 from tweag/dependabot/npm_and_yarn/web-playground/axios-1.7.7

and the result:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
967a80513ea54bbf44a84381e08fa186cc203914
04315d920cbd8fd51f20390bd93d2f2a070ff681
66c1e81c6b4ea175452f21fceebe50d81d9ad4aa
6d0a86998e7fe8a26d40a7320229749b7e84d18e
We cannot bisect more!

All these commits belong to #716, the PR that introduced dynamic loading of grammars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant