It appears that there is some issue with git or github. I suggest you to try to run this command manually to troubleshoot the issue with git/github. Below is how to do this manually.
Login to the above VM where the code is getting deployed
Change to cchq user
CD into /home/cchq/www/monolith/releases/2022-06-29_17.28 directory
I suspect this is still an issue with the remote URLs for the git repositories on your current release (located at /home/cchq/www/monolith/current).
If you login to the server and cd to that directory (similar to what Sravan asked above, but in the current release this time, not the new release) and run the following two commands:
This will print out the remote URL for the commcare-hq repository (first command) and all the remote URLs for the submodules (second command). I suspect some of those URLs need to be adjusted.
git submodule foreach 'git remote get-url origin'
Entrée dans 'corehq/apps/hqmedia/static/hqmedia/MediaUploader'
git://github.com/dimagi/MediaUploader.git
Entrée dans 'submodules/commcare-translations'
git://github.com/dimagi/commcare-translations.git
Entrée dans 'submodules/couchdbkit-aggregate'
git://github.com/dimagi/couchdbkit-aggregate.git
Entrée dans 'submodules/django-digest-src'
git://github.com/dimagi/django-digest.git
Entrée dans 'submodules/django-no-exceptions'
git://github.com/dimagi/django-no-exceptions.git
Entrée dans 'submodules/langcodes'
git://github.com/dimagi/langcodes.git
Entrée dans 'submodules/python-digest'
git://github.com/dimagi/python-digest.git
Entrée dans 'submodules/xml2json'
git://github.com/dimagi/xml2json.git
The https:// URL is fine, but the submodules are using the old git:// URL format and need to be changed (either the https://github.com/ prefix or the git@github.com: prefix will work, more info at this GitHub doc).
I didn't pay attention to the url. Many thanks Joel for the very good remark.
So I first modified the submodules urls format with git@github.com format, but deploy was still not working then I used the https://github.com/ format.
With this last one the deploy really started, but I face another error now.
[x.x.x.x] sudo: virtualenv-clone /home/cchq/www/monolith/releases/2020-09-29_11.57/python_env-3.6 /home/cchq/www/monolith/releases/2022-07-01_18.34/python_env-3.6
[x.x.x.x] sudo: sed -i -e "s~/home/cchq/www/monolith/current/python_env-3.6~/home/cchq/www/monolith/releases/2022-07-01_18.34/python_env-3.6~g" $(find /home/cchq/www/monolith/releases/2022-07-01_18.34/python_env-3.6/bin/ -type f)
[x.x.x.x] sudo: export HOME=/home/cchq && source /home/cchq/www/monolith/releases/2022-07-01_18.34/python_env-3.6/bin/activate && pip uninstall -r /home/cchq/www/monolith/releases/2022-07-01_18.34/requirements/uninstall-requirements.txt --yes
[x.x.x.x] out: ERROR: Could not open requirements file: [Errno 2] Aucun fichier ou dossier de ce type: '/home/cchq/www/monolith/releases/2022-07-01_18.34/requirements/uninstall-requirements.txt'
[x.x.x.x] out:
Fatal error: sudo() received nonzero return code 1 while executing!
This "file not found" error is puzzling to me. I'm not familiar with that file or what part of a deploy needs it. Maybe someone who has more cchq familiarity will know when a deploy might expect this file?