Skip to content

Make the Git username configurable for builds from Git (spec.git.username) #6874

Open

Description

@jboueckegus

Description

Follow-up of #6869 / #6873, as suggested in #6873 (comment).

#6873 makes the Git username configurable for the gitops trait (gitops.username). Building an Integration from a Git repository (spec.git / kamel run --git ...) still authenticates with the hardcoded username camel-k:

  • pkg/builder/git.go, cloneProject, passes DefaultGitUsername (camel-k) to CloneGitProject
  • GitConfigSpec (pkg/apis/camel/v1/build_types.go) has no field to configure it

To our understanding this prevents building from a private Bitbucket Cloud repository with a repository/project/workspace access token, because Bitbucket only accepts the username x-token-auth for those tokens (see https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/).

Proposal

For parity between the Git build feature and the gitops trait:

  • add a username field to GitConfigSpec, so it is available as .spec.git.username on the Integration and propagated to the Build
  • cloneProject passes Build.Git.Username, falling back to DefaultGitUsername when empty (backward compatible)
  • optionally a kamel run --git-username flag
  • regenerate CRDs and docs

Claude Code on behalf of Jan Bouecke

Activity

  1. added this to the 2.12.0 milestone on Oct 9, 2026
  2. squakez commented on Oct 12, 2026

    @squakez
    Contributor

    @jboueckegus if you plan to work on this one, please, comment here to get the feature assigned.

  3. jboueckegus commented on Oct 12, 2026

    @jboueckegus
    ContributorAuthor

    @squakez : I am sorry, but at the moment I am not able to do it.

  4. SunilKumarPradhan commented on Oct 12, 2026

    @SunilKumarPradhan

    Hi @squakez , I would like to work on this Issue . Could you please assign this to me ?

  5. ansh0014 commented on Oct 13, 2026

    @ansh0014
    Contributor

    Hi @squakez I'd like to work on this issue. Could you please assign it to me?

  6. squakez commented on Oct 13, 2026

    @squakez
    Contributor

    8. Hi @squakez I'd like to work on this issue. Could you please assign it to me?

    Thanks for the interest. I've already assigned to @SunilKumarPradhan who had commented first. Feel free to pick up any other open issue if you want. Thanks!

  7. ansh0014 commented on Oct 13, 2026

    @ansh0014
    Contributor

    ok

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

Metadata

Metadata

Labels

area/gitgood first issueDoes not require full understanding of the codebasekind/featureNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions