summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects/git_http_client_controller.rb5
-rw-r--r--app/views/profiles/personal_access_tokens/index.html.haml2
2 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/projects/git_http_client_controller.rb b/app/controllers/projects/git_http_client_controller.rb
index e48403ca817..abe47f80858 100644
--- a/app/controllers/projects/git_http_client_controller.rb
+++ b/app/controllers/projects/git_http_client_controller.rb
@@ -94,7 +94,10 @@ class Projects::GitHttpClientController < Projects::ApplicationController
def check_2fa(auth_type)
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
diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml
index 03ee682b343..d2964c065d1 100644
--- a/app/views/profiles/personal_access_tokens/index.html.haml
+++ b/app/views/profiles/personal_access_tokens/index.html.haml
@@ -9,7 +9,7 @@
You can generate a personal access token for each application you use that needs access to the GitLab API.
%p
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