Document how to work with private git repositories
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the problem / feature request:
It's unclear how to use a private git repository with bazel. Please consider documenting how to set this up more prominently in the repository documentation.
### Feature requests: what underlying problem are you trying to solve with this feature?
Interactive commands tend to fail because the git + ssh handshake may need the user to enter a password to unlock the ssh private key.
### What operating system are you running Bazel on?
Ubuntu 20.04
### What's the output of `bazel info release`?
release 3.2.0
### Have you found anything relevant by searching the web?
- jayconrad's article: https://jayconrod.com/posts/114/accessing-private-github-repositories-over-http
- rules_go issue: https://github.com/bazelbuild/rules_go/issues/1280
- google groups discussion: https://groups.google.com/forum/#!topic/bazel-discuss/geO8pgwxMBY
- rules_jvm_external issue related to private repo auth: https://github.com/bazelbuild/rules_jvm_external/issues/80
### Example error message
`ERROR: /home/red/git/blah/BUILD.bazel:3:11: //cmd/downloader:go_default_library depends on @private_thing//:go_default_library in repository @private_thing which failed to fetch. no such package '@private_thing//': failed to fetch private_thing: # cd .; git clone git@github.com:gonzojive/blah.git /home/red/.cache/bazel/_bazel_red/11b28b8a9f8bcb1f153ff86ce3120090/external/private_thing`
Contributor guide
Research direction
Start with the repository documentation and the linked article, rules_go issue, discussion, and related authentication issue. Document how to use a private git repository with Bazel, including the SSH private-key password prompt and the shown fetch failure; done when users can follow the setup without relying on interactive commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100