Open Annrtl opened 5 months ago
@fmeum Do you have any instructions/ideas on how to achieve this? I see this as a blocker for us to adopt bzlmod since we don't want to use the credentials helper to distribute personal access tokens (but rather rely on the already configured ssh key) to access a private git repository.
Since the registry model is heavy on random access to specific paths, I'm not sure Bazel could do better than checking out the repo completely to some local path and then using that as the registry. This poses the non-trivial problem of when to fetch and check for updates to the remote repo.
Could you include this logic into your tools/bazel
wrapper and just point Bazel to the local path to which your wrapper clones it? That should give you essentially the same user experience today, plus you would have full control over when to git fetch
.
@fmeum I can see how that would work, but it's also extra logic that every user of Bazel now has to take care of implementing. Even if there was a way to just create a git_repository
and hook that up to be a registry, that would be much more ideal. Or possibly a way to adopt a registry via a downloaded zip file that we could produce by packaging up the internal repo and make that even more cacheable and reproducible?
Description of the feature request:
Be able to use a git SSH registry URL Example in .bazelrc:
Which category does this issue belong to?
No response
What underlying problem are you trying to solve with this feature?
Add a private git repository protected by ssh key as Bazel register
Which operating system are you running Bazel on?
Rocky Linux 9.4 (Blue Onyx)
What is the output of
bazel info release
?release 7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Using a git SSH registry URL gives me the following error message