Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,506
    • Issues 2,506
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #27302
Closed
Open
Issue created Dec 09, 2020 by Steve Abrams@sabramsDeveloper

Automatically authenticate with the Dependency Proxy

Description

Runner already automatically authenticates with the integrated GitLab container registry. We are introducing authentication to the Dependency Proxy, which means that to use the dependency proxy, a user must add their credentials to the DOCKER_AUTH_CONFIG environment variable or manually docker login somewhere in their CI script.

Proposal

Allow runners to automatically authenticate with the dependency proxy. I believe credentials for the GitLab container registry and DOCKER_AUTH_CONFIG are handled in this section of code. It's likely we could also use the exact same credentials we are using for the GitLab container registry.

The server that needs to be added is simply the GitLab host.

I'm not sure how we handle this authentication, but if we are editing the config file, we would need to add gitlab.com to the auths list:

{
    "auths": {
        "https://gitlab.com": {
            "auth": "(Base64 username:password value)"
        }
    }
}

If we are executing a login command, we would need to log in to gitlab.com:

docker login --username foo --password bar gitlab.com

Links to related issues and merge requests / references

  • gitlab#11582 (closed)
Edited Dec 14, 2020 by Steve Abrams
Assignee
Assign to
Time tracking