-
Notifications
You must be signed in to change notification settings - Fork 668
Credential-based login is broken after removal of /session endpoint #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm experiencing this as well. Our GitLab CE was just updated to 10.2.1 this last weekend and now gl.auth throws a 404. I'm using the latest version of python-gitlab. |
Without the One possible solution is to use cookie authentication:
I have not tested this solution but according to Gitlab docs cookie authentication is supposed to work. |
Experiencing this too as soon as upgraded to 10.2 |
I am experiencing the same problem even I didn't upgrade gitlab. It seems the commands: s = gitlab.Gitlab('https://gitlab.com',email='my_username',password='my_password') not working. Thank you for the response! |
im experiencing the same issue with our updated Gitlab instance to 10.2 |
GitLab has decided to remove the I've successfully used cookie authentication on gitlab.com with the following code: https://gist.github.com/gpocentek/bd4c3fbf8a6ce226ebddc4aad6b46c0a I'll add some documentation to python-gitlab. |
@gpocentek , do you mean that there will be only token authentication since GL10.2? |
found in GL changelog 10.2 |
@gpocentek Do you plan on integrating this workaround into python-gitlab? |
@GhostLyrics I'm afraid not, because there are multiple ways to authenticate using the web UI (LDAP and DB authentication use different endpoints for instance), and I'm not really sure that things will not change and break. GitLab devs clearly want to make personal token authentication the default. This makes full automation more complicated (functional testing for python-gitlab needs to be updated as well), but it also makes sense. My plan to resolve this issue is to update the documentation with code examples, to make initial setup of tokens easier. |
@gpocentek Thank you for your efforts and the code sample, it works like a charm, now i do agree with you that things might change and break, GitLab undergoes major changes every few months, adding new features and functionality, we've been using it since it was v4 and it has come a long long way |
@gpocentek - Thanks for the update Gauvain. I see now that it's just a change in GitLab's code, and nothing you can do about it. The module is great though, and I appreciate your work. I've converted to using a private token, which I programmatically pull from a password management system using my credentials. For others, if you don't have a secure password system, you can use a token of an account with less privileges on your GitLab projects, and generate a token for that account to pull code. It's not perfect, but it's an option. |
Hi! We've also hit this problem in git-as-svn/git-as-svn#154. Did anyone try to file a bugreport to GitLab so they would consider returning back password-based authentication API? I'm also interested in GitLab ticket that triggered removal of /session API. |
Okay, it is possible to perform login/password -> token authentication even with GitLab 10.2: https://docs.gitlab.com/ce/api/oauth2.html#resource-owner-password-credentials That's how it was done in git-as-svn (Java): slonopotamus/git-as-svn@8a4d067 So I think you should reopen this issue and reimplement login/password authentication via OAuth2 too. |
/api/v4/session
has been removed and it is currently not possible to log in via email/password combination. [Deprecation notice, Changelog]I use this to completely automate testing (e.g. create a GitLab instance, set a password for root, run some tests, tear everything down).
The text was updated successfully, but these errors were encountered: