Skip to content

Invalid projects URL prevent authentication #74

@simon-jouet

Description

@simon-jouet

First off, thanks for verdaccio-gitlab it's been great to use!

I just migrated my gitlab from one server to another and moved verdaccio with it. At the same time I upgraded the version of both gitlab and verdaccio but I'm running into some issues now with the authentication.

Looking a bit into it I get this error from verdaccio

[2019-05-10 09:04:20]  info <-- 10.0.1.4 requested 'PUT /-/user/org.couchdb.user:simon-jouet'
[2019-05-10 09:04:20]  error--- [gitlab] user: simon-jouet error querying gitlab: StatusCodeError: 404 - {"error":"404 Not Found"}
[2019-05-10 09:04:20]  http <-- 401, user: null(62.30.156.32 via 10.0.1.4), req: 'PUT /-/user/org.couchdb.user:simon-jouet', error: error authenticating user
[2019-05-10 09:04:20]  http <-- 401, user: null(62.30.156.32 via 10.0.1.4), req: 'PUT /-/user/org.couchdb.user:simon-jouet', error: error authenticating user

and looking into gitlab API logs, I noticed that url called to get the projects is incorrect

10.0.3.4 - - [10/May/2019:09:04:20 +0000] "GET /api/v4/user HTTP/1.1" 200 810 "" "-"
10.0.3.4 - - [10/May/2019:09:04:20 +0000] "GET /api/v4/groups?min_access_level=40 HTTP/1.1" 200 563 "" "-"
10.0.3.4 - - [10/May/2019:09:04:20 +0000] "GET /api/v4/projects?min_access_level=40 HTTP/1.1" 200 39581 "" "-"
10.0.3.4 - - [10/May/2019:09:04:20 +0000] "GET /api/v4/https://<my_gitlab_url>/api/v4/projects?membership=false&min_access_level=40&order_by=created_at&owned=false&page=2&per_page=20&simple=false&sort=desc&starred=false&statistics=false&with_custom_attributes=false&with_issues_enabled=false&with_merge_requests_enabled=false HTTP/1.1" 404 25 "" "-"

In that you can see that the final call is /api/v4 but then the aboslute url to the gitlab project is used.

For the time being I reverted to the previous version of verdaccio-gitlab with image: bufferoverflow/verdaccio-gitlab@sha256:1a5c2e910cff98f2ab3c8030c868c8d2013274f0a0edaf83ba6a01270f5900ef and it seems to be working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions