Skip to content

Can't create pipeline #1240

@synergiator

Description

@synergiator

Description of the problem, including code/CLI snippet

Can't create a pipeline, getting error 500.

project = self.gitlab.projects.get(project_id)

pipeline = project.pipelines.create({'ref': ref, 'variables': [variables]})

Expected Behavior

Pipeline creation successful

Actual Behavior

Error 500:

gitlab.exceptions.GitlabCreateError: 500: 

500 Internal Server Error

Specifications

I can reproduce the problem in two slightly different environments with exactly same behavior.

Please consider also the additional section "Test control logic"

Envrionment 1

  • Python version: 3.8.5
  • python-gitlab version: 2.5.0
    • API version you are using (v3/v4): v4
    • Gitlab server version: 13.4.5-ee

Environment 2

  • Python version: 3.10.0a2
  • python-gitlab version: 2.5.0
    • API version you are using (v3/v4): v4
    • Gitlab server version: 13.5.4

Test control logic

Assuming there might be indeed a problem in the context where/how I use the python-gitlab lib I thought it might be helpful to run in parallel an API call using curl. Indeed the following call does create a pipeline in my target GitLab project.

curl --request POST --header 'PRIVATE-TOKEN: [MASKED]' 'GITLAB_URL//api/v4/projects/3/pipeline?ref=master' -d '[{ '\''CI_VARIABLE'\'': '\''IT WORKS!! SOURCE PIPELINE 12'\'' }]'

The pipeline is though not successful; as it seems, there is some auth problem, though the access token has all access rights you can give it for a repo.

Reinitialized existing Git repository in /builds/plab/dynamicpipelines/target/.git/
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://GITLAB_URL/plab/dynamicpipelines/target.git/'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions