Prompt user to create personal access token for Git over HTTP
What does this MR do?
If internal auth is disabled and LDAP is not configured on the GitLab instance, present the user with a message to create a personal access token if his Git over HTTP auth attempt fails.
robins-mbp:Repos ryehle$ git clone http://joe@localhost:3000/robinbobbitt/hello-world.git Cloning into 'hello-world'... Password for 'http://joe@localhost:3000': remote: HTTP Basic: Access denied remote: You must use a personal access token with 'api' scope for Git over HTTP. remote: You can generate one at http://localhost:3000/profile/personal_access_tokens fatal: Authentication failed for 'http://joe@localhost:3000/robinbobbitt/hello-world.git/'
Are there points in the code the reviewer needs to double check?
I have only tested the JwtController changes with specs, as I do not have GitLab Container Registry configured.
Why was this MR needed?
Our GitLab instance is configured to use CAS authentication only; internal auth/sign-in is disabled. Our biggest support issue since we have gone into production is that users are trying to perform Git over HTTP authentication with their external credentials, rather than a personal access token. With this code change, users will have an indication that their external credentials have no hope of working and they must create a personal access token.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
None.