Skip to content

Credential issue with gitlab provider #193

Description

@edramos-97

cli version: 1.39
Hi!

I'm experiencing a credential issue, more specifically using the gitlab provider when requesting to create a pull request the commits fail to fetch. Following are my job configuration and partial output

job:
  package-manager: npm_and_yarn
  allowed-updates:
    - dependency-type: direct
      update-type: all
  source:
    provider: gitlab
    hostname: example.com
    api-endpoint: https://example.com/api/v4
    repo: my-project
    directory: /my-folder
credentials:
  - type: git_source
    host: example.com
    password: token
updater | 2023/11/08 10:57:07 INFO Submitting @apollo/client pull request for creation
proxy | 2023/11/08 10:57:15 [119] GET https://example.com:443/api/v4/projects/my-project/repository/commits?
proxy | 2023/11/08 10:57:15 [119] * authenticating git server request (host: example.com)
proxy | 2023/11/08 10:57:15 [119] 404 https://example.com:443/api/v4/projects/my-project/repository/commits?
proxy | 2023/11/08 10:57:15 [119] * auth'd git request returned 404, retrying without auth
proxy | 2023/11/08 10:57:15 [119] * de-auth'd request returned 404, ignoring response

I've looked through the codebase and noticed the dependency on the gitlab api ruby project so I did some testing with that one to understand where the problem lies and found that project to be working fine running the following command.
gitlab commits my-project

Activity

  1. arielsrv commented on Nov 15, 2023

    @arielsrv

    I think the problem is that it doesn't propagate the token in the PRIVATE_TOKEN header, more info here: https://docs.gitlab.com/ee/api/commits.html.

    Steps to reproduce in your code:
    curl 'https://example.com:443/api/v4/projects/my-project/repository/commits?'
    curl -H 'PRIVATE-TOKEN: token' 'https://example.com:443/api/v4/projects/my-project/repository/commits?'

  2. madduci commented on Sep 11, 2025

    @madduci

    i get the same error on the newer version (1.72.0) as well

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