mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Start rewriting git@github submodues to use https
This commit is contained in:
parent
65d796c93a
commit
25a8dd5af4
@ -345,6 +345,19 @@ class vcs_git(vcs):
|
||||
|
||||
def initsubmodules(self):
|
||||
self.checkrepo()
|
||||
submfile = os.path.join(self.local, '.gitmodules')
|
||||
if not os.path.isfile(submfile):
|
||||
raise VCSException("No git submodules available")
|
||||
|
||||
# fix submodules not accessible without an account and public key auth
|
||||
with open(submfile, 'r') as f:
|
||||
lines = f.readlines()
|
||||
with open(submfile, 'w') as f:
|
||||
for line in lines:
|
||||
if 'git@github.com' in line:
|
||||
line = line.replace('git@github.com:', 'https://github.com/')
|
||||
f.write(line)
|
||||
|
||||
for cmd in [
|
||||
['git', 'reset', '--hard'],
|
||||
['git', 'clean', '-dffx'],
|
||||
|
Loading…
Reference in New Issue
Block a user