emacs-gitlab icon indicating copy to clipboard operation
emacs-gitlab copied to clipboard

404 on login

Open ghost opened this issue 7 years ago • 5 comments

I have the following in my config.org, When I run gitlab-login I get a 404 error.

(setq gitlab-host "https://gitcrate.org"
      gitlab-username "gregf"
      gitlab-passowrd "super_secure")
(use-package gitlab
  :ensure t)

ghost avatar Jan 04 '18 01:01 ghost

I also get a 404 on regular gitlab.com, when it used to work.

I'm not aware of an API change, what could it be ?

vindarel avatar Jan 04 '18 09:01 vindarel

It is certainly an api change.

emacs-gitlab uses the v3 endpoint when Gitlab documents its v4.

Allright got it: https://docs.gitlab.com/ce/api/v3_to_v4.html

Since GitLab 9.0, API V4 is the preferred version to be used.

API V3 will be unsupported from GitLab 9.5, to be released on August 22, 2017. It will be removed in GitLab 9.5 or later.

emacs-gitlab uses username and password and it is not possible any more: https://docs.gitlab.com/ce/api/#authentication The available methods are

  • OAuth2 tokens (https://gitlab.example.com/api/v4/projects?access_token=OAUTH-TOKEN)
  • private tokens that one must create per account. Doc: https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html

vindarel avatar Jan 13 '18 01:01 vindarel

But cool no need of authentication for public projects:

GET /projects/:id Get a specific project. This endpoint can be accessed without authentication if the project is publicly accessible.

https://docs.gitlab.com/ce/api/projects.html#get-single-project

vindarel avatar Jan 13 '18 01:01 vindarel

You can avoid the login function and just set gitlab-token-id

(setq gitlab-token-id "yourtoken")

LaloHao avatar Jan 24 '18 11:01 LaloHao

This patch is on the develop branch, so I don't see any update on melpa. Can we merge this on master, @nlamirault ?

vindarel avatar Mar 12 '18 14:03 vindarel