Any idea what is the below error means?

hab[11378]: builder-api.default(O): [2019-10-11T07:00:53Z DEBUG reqwest::async_impl::response] Response: ‘403 Forbidden’ for https://gitlab.xxx.xxxx.xxx/api/v4/user
hab[11378]: builder-api.default(O): [2019-10-11T07:00:53Z DEBUG tokio_reactor::registration] scheduling Read for: 0
hab[11378]: builder-api.default(O): [2019-10-11T07:00:53Z DEBUG oauth_client::gitlab] GitLab response body: {“error”:“insufficient_scope”,“error_description”:“The request requires higher privileges than provided by the access token.”,“scope”:“read_user api”}
hab[11378]: builder-api.default(O): [2019-10-11T07:00:53Z INFO actix_web::middleware::logger] 10.xxx.xxx.xx:50494 “GET /v1/authenticate/7d04d7513d1f3391aad9efbe4eb37ddcfc479b40339547fbbc26eae0f8677b9c HTTP/1.1” 401 0 “http://10.XXX.XXXX.XXXX/?code=7d04d7513d1f3391aad9efbe4eb37ddcfc479b40339547fbbc26eae0f8677b9c&state=8e721445-382a-4193-bfd7-3bce8fa4d5f3” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36” 1.134844

hab[11378]: builder-api.default(O): [2019-10-11T07:04:08Z DEBUG reqwest::async_impl::response] Response: ‘401 Unauthorized’ for https://gitlab.xxxx.xxx.xxx/vasiredp
hab[11378]: builder-api.default(O): [2019-10-11T07:04:08Z DEBUG tokio_reactor::registration] scheduling Read for: 0
hab[11378]: builder-api.default(O): [2019-10-11T07:04:08Z DEBUG oauth_client::gitlab] GitLab response body: {“error”:“You need to sign in or sign up before continuing.”}
hab[11378]: builder-api.default(O): [2019-10-11T07:04:08Z INFO actix_web::middleware::logger] 10.xxx.xxx.xx:51310 “GET /v1/authenticate/372a39bd831655b4a8c46a397d9aee2bd6f86408f4892ad1a3a157f5794e409c HTTP/1.1” 401 0 “http://10.XXX.XXXX.XXXXX/?code=372a39bd831655b4a8c46a397d9aee2bd6f86408f4892ad1a3a157f5794e409c&state=8e721445-382a-4193-bfd7-3bce8fa4d5f3” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36” 1.138843

I believe the Oauth App you create under Gitlab needs to have more permissions:

hab[11378]: builder-api.default(O): [2019-10-11T07:00:53Z DEBUG oauth_client::gitlab] GitLab response body: {“error”:“insufficient_scope”,“error_description”:“The request requires higher privileges than provided by the access token.”,“scope”:“read_user api”}

I think you need these two minimally:

  • read_user (Read the authenticated user’s personal information)
  • openid (Authenticate using OpenID Connect)

Thanks bdangit.

I assigned those two permissions in gitlab side , but still same error .

Do you think that we have to adjust something in gitlab administration end as well ?

Maybe. You should clear out all your Gitlab cookies and any browser cookies. Then try again with Habitat On Prem Builder.

If the flow still doesn’t work, make sure the Oauth tokens are correct.