Finally got this to work! In case anyone’s interested here was my solution:
Set python symbolic link to point to python 3:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3 /usr/bin/python
Back-up copy of /usr/bin/repo:
sudo cp /usr/bin/repo /usr/bin/repo.bak
Download copy of repo
from https://storage.googleapis.com/git-repo-downloads/repo to /usr/bin/repo
replacing original /usr/bin/repo
Ran leaf getsrc swi-linux
and got this error:
Downloading manifest from ssh://david.churchill@thingtech.com@gerrit.legato.io:29418/manifest
Traceback (most recent call last):
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
_Main(sys.argv[1:])
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
result = run()
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
result = cmd.Execute(copts, cargs)
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 519, in Execute
self._SyncManifest(opt)
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 220, in _SyncManifest
default_branch = m.ResolveRemoteHead()
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 1914, in ResolveRemoteHead
output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD')
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3034, in runner
(self._project.name, name, p.stderr))
error.GitError: manifests ls-remote: usage: git ls-remote [--heads] [--tags] [--upload-pack=<exec>]
[-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]
Opened /home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py
and put the following line in at line #3026: print("Name: {} args: {}".format(name, args))
Re-ran leaf getsrc swi-linux and got this error:
Name: var args: ('GIT_COMMITTER_IDENT',)
Traceback (most recent call last):
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
_Main(sys.argv[1:])
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
result = run()
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
result = cmd.Execute(copts, cargs)
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 524, in Execute
self._ConfigureUser(opt)
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 380, in _ConfigureUser
name = self._Prompt('Your Name', mp.UserName)
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 613, in UserName
self._LoadUserIdentity()
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 626, in _LoadUserIdentity
u = self.bare_git.var('GIT_COMMITTER_IDENT')
File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3035, in runner
(self._project.name, name, p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'dcchurchill@ubuntu.(none)')
Ran (with my actual e-mail and name):
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Ran leaf getsrc swi-linux
one more time and it worked!