jboueckegus opened a new pull request, #6873:
URL: https://github.com/apache/camel-k/pull/6873
The `gitops` trait authenticated clone and push with the hardcoded username
`camel-k`. Bitbucket Cloud repository/project/workspace access tokens only work
with the username `x-token-auth`, so the trait could not be used with Bitbucket.
This implements option 1 from the issue, as agreed in the issue discussion.
**Changes**
- New trait property `gitops.username` (default `camel-k`, backward
compatible), used for both clone and push:
```yaml
traits:
gitops:
username: x-token-auth
```
- `pkg/util/gitops`: new `CloneGitProjectWithUsername`; `CloneGitProject`
keeps its signature (still used by the builder for `spec.git`) and delegates
with the default username.
- Regenerated CRDs, Helm CRDs and trait/API docs (`make generate`, `make
update-docs`).
**Tests**
- Unit tests verify the basic-auth username actually sent to a fake Git HTTP
server, for clone (default, custom, empty, no token) and for the trait push
flow (default and custom).
- `go test ./pkg/trait/... ./pkg/util/gitops/... ./pkg/builder/...` pass,
`make lint` is clean.
Fixes #6869
_Claude Code on behalf of Jan Bouecke_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]