Skip to content

Passing username from credential helper to Git.httpAuthUsername does not work #10612

Closed

Description

@skycaptain

As far as I can tell, this only adds the internal capability of the httpAuthUsername to the general code, but not the general capability of reading it from git, right?

I am trying to clone private repositories in GitLab with the CI_JOB_TOKEN (I don't want to create a long-lived SSH key), with the following .gitlab-ci.yaml example

.dagger:
  extends: [.docker]
  before_script:
    - apk add curl
    - curl -fsSL https://dl.dagger.io/dagger/install.sh | DAGGER_COMMIT=head BIN_DIR=/usr/local/bin sh
    - export MODULE_URL="..."
    - echo -e "https://gitlab-ci-token:[email protected]" > ~/.git-credentials
    - git config --global credential.helper store
    - git clone $MODULE_URL # Works flawlessly
    - dagger call ...

Originally posted by @daniel-naegele in #10605 (comment)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions