Can't configure GitLab account when protected by basic auth

Answered

If a GitLab instance is protected by basic authentication, it is not possible to configure it in Settings>Version Control>GitLab.
Indeed, while one would try to configure the Server with https://login:password@some-gitlab-url.com and the Token with a working token, IntelliJ will use the token as “Authorization: Bearer” header (I've tcpdump-ed to make sure of it), which will replace any basic auth configured through the Server URL.

Could you use an alternative way of providing the token (see: https://docs.gitlab.com/ee/api/rest/index.html#personalprojectgroup-access-tokens)?
I'd suggest using “PRIVATE-TOKEN” header in order to make it possible to use “Authorization” header for the basic authentication instead of providing the GitLab token.

0
4 comments

Hi,

We do not have plans for such implementation. 

Can you please share what would be the use-case?

Why is only basic auth configured? (which is not as safe as the token itself)

0

Basic auth is added in addition to GitLab authentication (cookie/token/…).

The use case is the one I presented: GitLab is behind basic auth. So to access API, you need to provide both basic auth (through Authorization header) and the token (so NOT through Authorization header as it's already used by basic auth).

But as PRIVATE-TOKEN can also be used to provide authentication on GitLab API, why not just change the implementation to use PRIVATE-TOKEN header instead of Authorization (letting the possibility to use Authorization for basic auth then)?

0

Understandable. 

Can you please open a Feature Request in our youtrack regarding this? 

Much appreciated. 

0

Please sign in to leave a comment.