Reputation: 475
This question seems simple, but I cannot find any answer on official site.
I have also tried out gitlab API with plenty url variations (an ofc. with real credentials):
import gitlab
gl = gitlab.Gitlab('https://gitlab.com', email='[email protected]', password='asdf')
gl.auth()
But it always fails with:
gitlab.exceptions.GitlabAuthenticationError: 404: {"error":"404 Not Found"}
I want to add some feature to my kicad/git workflow and I need make some stuff automatically.
Upvotes: 2
Views: 735
Reputation: 2434
GitLab have decided to remove the /session
endpoint that the python gitlab module uses for password authentication.
You will need to look into the cookie or access token authentication methods instead.
Read this github issue thread for more information.
Upvotes: 1
Reputation: 3489
Yes the API for SaaS Gitlab.com is active.
Use this link to retrieve the first batch of projects: https://gitlab.com/api/v4/projects
I am not aware of the libary which you are using here, but you can try to replace https://gitlab.com
with https://gitlab.com/api/v4/
Further it is not a good practice to insert passwords into the source code. For that reason there are tokens. That way you can limit the access to specific tasks and prevent anybody, who gets in possession of the code, to takeover your account. https://docs.gitlab.com/ce/api/README.html#authentication
Upvotes: 1