mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Start rewriting git@github submodues to use https
This commit is contained in:
parent
65d796c93a
commit
25a8dd5af4
1 changed files with 13 additions and 0 deletions
|
@ -345,6 +345,19 @@ class vcs_git(vcs):
|
||||||
|
|
||||||
def initsubmodules(self):
|
def initsubmodules(self):
|
||||||
self.checkrepo()
|
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 [
|
for cmd in [
|
||||||
['git', 'reset', '--hard'],
|
['git', 'reset', '--hard'],
|
||||||
['git', 'clean', '-dffx'],
|
['git', 'clean', '-dffx'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue