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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1b2d19ab
Commit
1b2d19ab
authored
Oct 17, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-lfs needs HTTP auth creds always written out
parent
91532018
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
qa/qa/git/repository.rb
qa/qa/git/repository.rb
+14
-2
qa/qa/resource/repository/push.rb
qa/qa/resource/repository/push.rb
+4
-0
No files found.
qa/qa/git/repository.rb
View file @
1b2d19ab
...
...
@@ -34,13 +34,19 @@ module QA
def
username
=
(
username
)
@username
=
username
@uri
.
user
=
username
# Only include the user in the URI if we're using HTTP as this breaks
# SSH authentication.
@uri
.
user
=
username
unless
ssh_key_set?
end
def
use_default_credentials
self
.
username
,
self
.
password
=
default_credentials
add_credentials_to_netrc
unless
ssh_key_set?
# Write out .netrc as we need it for:
#
# git & git-lfs over HTTP
# git-lfs over SSH
add_credentials_to_netrc
if
add_credentials?
end
def
clone
(
opts
=
''
)
...
...
@@ -139,6 +145,12 @@ module QA
alias_method
:use_lfs?
,
:use_lfs
def
add_credentials?
return
true
unless
ssh_key_set?
return
true
if
ssh_key_set?
&&
use_lfs?
false
end
def
ssh_key_set?
!
private_key_file
.
nil?
...
...
qa/qa/resource/repository/push.rb
View file @
1b2d19ab
...
...
@@ -59,7 +59,11 @@ module QA
repository
.
use_default_credentials
unless
user
end
# Needed so git-lfs can work as it uses HTTP for authentication
# regardless of git using SSH or HTTP.
#
repository
.
use_lfs
=
use_lfs
repository
.
use_default_credentials
username
=
'GitLab QA'
email
=
'root@gitlab.com'
...
...
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