Commit f971026a authored by Patricio Cano's avatar Patricio Cano

Added better information about the personal tokens

parent 0f37721b
...@@ -94,7 +94,10 @@ class Projects::GitHttpClientController < Projects::ApplicationController ...@@ -94,7 +94,10 @@ class Projects::GitHttpClientController < Projects::ApplicationController
def check_2fa(auth_type) def check_2fa(auth_type)
if user && user.two_factor_enabled? && auth_type == :gitlab_or_ldap if user && user.two_factor_enabled? && auth_type == :gitlab_or_ldap
render plain: "HTTP Basic: Access denied\nYou have 2FA enabled, please use a personal access token for Git over HTTP\n", status: 401 render plain: "HTTP Basic: Access denied\n"\
"You have 2FA enabled, please use a personal access token for Git over HTTP.\n"\
"You can generate one at #{profile_personal_access_tokens_url}",
status: 401
end end
end end
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
You can generate a personal access token for each application you use that needs access to the GitLab API. You can generate a personal access token for each application you use that needs access to the GitLab API.
%p %p
You can also use personal access tokens to authenticate against Git over HTTP. Use them specially when you You can also use personal access tokens to authenticate against Git over HTTP. Use them specially when you
have 2FA enabled. have Two-Factor Authentication (2FA) enabled.
.col-lg-9 .col-lg-9
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment