Skip to main content
1 vote
0 answers
50 views

python-gitlab & curl - Impossible to configure proxy

I have a problem ! I work on gitlab UI on python. I try to connect to gitlab like this: import requests import gitlab GITLAB_URL = 'MY_GITLAB_URL' PERSONAL_TOKEN = 'MY_PERSONAL_TOKEN' PROXIES = {&...
coincoin22's user avatar
0 votes
0 answers
50 views

Can't set gitlab project attribute with python-gitlab 4.11.1

I am trying to implement a Python app to set GitLab project container_expiration_policy. My code looks like: update_project = gl.projects.get(projectId) update_project.container_expiration_policy = ...
Yang Li's user avatar
  • 11
0 votes
0 answers
81 views

How to upload a GitLab project export to AWS S3 bucket using python-gitlab package

I am having issues trying to export/upload a GitLab project to AWS S3 using the following code that uses the Python python-gitlab package: import gitlab gl = gitlab.GitLab(url=<my_server>, ...
Eric27710's user avatar
  • 137
0 votes
0 answers
272 views

Using the Gitlab API in Python, how do I retrieve a file from a specific commit

For a project I am trying to retrieve every commit and for each updated file, I want to store the entire file (without the commit syntax, just the vanilla file) and which lines were updated. I am ...
AnnemarieWittig's user avatar
1 vote
1 answer
245 views

add a comment to an existing issue in gitlab

with that code I can create an issue in GitLab with python-gitlab issue = project.issues.create({'title': title, 'description': description}) issue.labels = ['label1', 'label2'] issue....
user3732793's user avatar
  • 1,980
0 votes
1 answer
203 views

AttibuteError when trying to get personal_access_token when using python-gitlab library

I'm trying to perform a basic task of getting the logged in users GitLab personal access token using the python-gitlab library. The documentation here is what I am using in the code below - https://...
Eric27710's user avatar
  • 137
0 votes
1 answer
400 views

How to update a Branch using python-gitlab for Gitlab API?

Im working on a small project which uses python-gitlab on its version 3.13.0 The project has a mixture of 2.x.x and 3.x.x features that i've been fixing, but there are a few methods for branches that ...
jarscs's user avatar
  • 5
1 vote
1 answer
143 views

How to get the projects url by project id by using gitlab library in python

I'm writing some script for gitlab and i wanna get urls of projects in gitlab by using only project ID so i read all docs about library python-gitlab but couldn't find some attributes for it. this is ...
Khassan Kambarov's user avatar
0 votes
1 answer
347 views

Python Gitlab's creating commit functionality doesn't work if the file is renamed

I have a source repository in gitlab and by forking that I've created destination repository. Now if in the source repository new commits are pushed I want to copy those commits in the destination ...
Chitrangda Pandya's user avatar
0 votes
1 answer
161 views

403 Forbidden error when I tried to assign a user developer role using GitLab API through Python code

I have written a Python program using FastAPI and the python-gitlab library (https://python-gitlab.readthedocs.io/en/stable/ ) to provide the developer role on the GitLab project repository to the ...
vinod827's user avatar
  • 1,574
0 votes
1 answer
2k views

Getting HTTP Error 403 Forbidden when making call to GitLab server using Python code

I have written a small Python code to get the Storage usage of a GitLab repository. However when I run my code then I get this 403 Forbidden error. This repo, say test_repo_1 is under a test_group_1. ...
vinod827's user avatar
  • 1,574
0 votes
1 answer
270 views

Python_Gitlab How to extract string from the output of ProjectJob.trace API call

I use python-gitlab API call ProjectJob.trace (https://python-gitlab.readthedocs.io/en/stable/api/gitlab.v4.html#gitlab.v4.objects.ProjectJob.trace) to get the log of a GitlabCI pipeline Terraform job....
YAZ84's user avatar
  • 93
0 votes
0 answers
27 views

Pushing picture to gitlab with python-gitlab

I am trying to push a jpg picture to a gitlab repo with python-gitlab. My code looks like gl = gitlab.Gitlab(GITLAB_URL, PRIVATE_TOKEN) project = gl.projects.get(PROJECT_ID) with open(file_path, 'rb')...
Limone's user avatar
  • 101
0 votes
2 answers
344 views

Set should_remove_source_branch to true is not reflected

with python-gitlab I can create and update merge requests in GitLab. However there is not much documentation on how to tick the "Delete source branch" I tried with mr.attributes['...
user3732793's user avatar
  • 1,980
0 votes
1 answer
979 views

Attempted to initialize RESTObject with a non-dictionary value when adding file to GitLab project using python-gitlab

I am trying to create GitLab projects through GitLab CI pipeline by importing the GitLab export tar.gz file using python-gitlab library. The new project gets created but does not get initialized with ...
Ashmeet Pahwa's user avatar

15 30 50 per page
1
2 3 4 5 6