nlamirault / emacs-gitlab

A Gitlab client for Emacs
GNU General Public License v2.0
139 stars 30 forks source link

Is login by token supported? #43

Open benquike opened 7 years ago

benquike commented 7 years ago

As the subject said

nlamirault commented 7 years ago

I don't think so. Do you have a link to the API ? example ?

benquike commented 7 years ago

https://docs.gitlab.com/ce/api/

Authentication -> Personal Access Tokens

benquike commented 7 years ago

BTW, I have tried using it, and found that this tool is very primitive. Do you have some plans?

To1ne commented 7 years ago

@benquike normally if you set gitlab-token-id, this should work. But unfortunately, I didn't get it working...

tjaartvdwalt commented 7 years ago

@To1ne, I have also not been able to set the gitlab-token-id.

After doing some digging, it seems that the POST /sessions endpoint has been disabled since 8.11, if you have 2-factor authentication enabled. See: https://docs.gitlab.com/ce/api/session.html

As far as I can see, using POST /sessions is the only way to authenticate using this plugin.

To1ne commented 7 years ago

@tjaartvdwalt It should work if you create a Personal Access Token and (setq gitlab-token-id "my-token"). You see, it is used here. But I admit, it isn't working very well.

tasmo commented 6 years ago

@To1ne Does not work for me either. I get an HTML 401 (Unauthorized) response.

norpol commented 6 years ago

Just successfully authenticated with this instructions on https://gitlab.com. I don't have 2-factor authentication enabled though.