Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f971026a
Commit
f971026a
authored
Aug 12, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added better information about the personal tokens
parent
0f37721b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
app/controllers/projects/git_http_client_controller.rb
app/controllers/projects/git_http_client_controller.rb
+4
-1
app/views/profiles/personal_access_tokens/index.html.haml
app/views/profiles/personal_access_tokens/index.html.haml
+1
-1
No files found.
app/controllers/projects/git_http_client_controller.rb
View file @
f971026a
...
...
@@ -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
\n
You 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
...
...
app/views/profiles/personal_access_tokens/index.html.haml
View file @
f971026a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment