Good day! I have a fresh installation of Ubuntnu 18.04. Used quick install script to install in as monolith server. At the end of script, when executing deploy step, I've got next warning about ownership in git repository and next error about parallel execution mode, running commcare-cloud monolith deploy
produce the same warning and error.
So warning:
(cchq) lamp@monolith:~/commcare-cloud$ commcare-cloud monolith deploy
[192.169.233.133] Executing task '_task'
[192.169.233.133] run: git rev-parse HEAD
[192.169.233.133] Passphrase for private key:
[192.169.233.133] out: fatal: detected dubious ownership in repository at '/home/cchq/www/monolith/releases/2022-08-18_16.41'
[192.169.233.133] out: To add an exception for this directory, call:
[192.169.233.133] out:
[192.169.233.133] out: git config --global --add safe.directory /home/cchq/www/monolith/releases/2022-08-18_16.41
[192.169.233.133] out:
Warning: run() received nonzero return code 128 while executing 'git rev-parse HEAD'!
Diff generation skipped. Supply a Github token to see deploy diffs.
New version details:
Branch deployed : commcare: master
Here's the complete diff on github: https://github.com/dimagi/commcare-hq/compare/fatal: detected dubious ownership in repository at '/home/cchq/www/monolith/releases/2022-08-18_16.41'
To add an exception for this directory, call:
git config --global --add safe.directory /home/cchq/www/monolith/releases/2022-08-18_16.41...91cf5d37ba5cc66a15994210f46e8a244b2d9501
And error:
Are you sure you want to preindex and deploy to monolith? [y/N]y
Vault Password for 'monolith':
Sending email: lamp has initiated a CommCare HQ deploy to monolith
Ubuntu 18.04.6 LTS
Enter passphrase for key '/home/lamp/.ssh/id_rsa':
Connection to 192.169.233.133 closed.
commcare-cloud monolith fab deploy_commcare --set code_branch=master --branch master
patched-fab -f /home/lamp/commcare-cloud/src/commcare_cloud/fabfile.py monolith deploy_commcare --set code_branch=master --disable-known-hosts --system-known-hosts /home/lamp/environments/monolith/known_hosts
Using commcare-hq branch master
[192.169.233.133] Executing task 'deploy_commcare'
[192.169.233.133] Executing task '_setup_release'
[192.169.233.133] Executing task 'create'
[192.169.233.133] sudo: mkdir -p /home/cchq/www/monolith/releases/2022-08-19_18.38Fatal error: Needed to prompt for a connection or sudo password (host: 192.169.233.133), but input would be ambiguous in parallel mode
Aborting.
!!! Parallel execution exception under host '192.169.233.133':Process 192.169.233.133:
Traceback (most recent call last):
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 449, in connect
sock=sock
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 446, in connect
passphrase,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 764, in _auth
raise saved_exception
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 735, in _auth
filename, pkey_class, passphrase
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 586, in _key_from_filepath
key = klass.from_private_key_file(key_path, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 235, in from_private_key_file
key = cls(filename=filename, password=password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/rsakey.py", line 55, in init
self._from_private_key_file(filename, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/rsakey.py", line 175, in _from_private_key_file
data = self._read_private_key_file("RSA", filename, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 308, in _read_private_key_file
data = self._read_private_key(tag, f, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 334, in _read_private_key
data = self._read_private_key_pem(lines, end, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 386, in _read_private_key_pem
raise PasswordRequiredException("Private key file is encrypted")
paramiko.ssh_exception.PasswordRequiredException: Private key file is encryptedDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 240, in inner
submit(task.run(*args, **kwargs))
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/decorators.py", line 52, in inner_decorator
return func(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/decorators.py", line 180, in inner
return func(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/operations/release.py", line 203, in create
sudo('mkdir -p {}'.format(env.code_root))
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 654, in host_prompting_wrapper
return func(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 1121, in sudo
stderr=stderr, timeout=timeout, shell_escape=shell_escape,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 929, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/state.py", line 397, in default_channel
chan = _open_session()
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/state.py", line 389, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 156, in getitem
self.connect(key)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 148, in connect
user, host, port, cache=self, seek_gateway=seek_gateway)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 528, in connect
password = prompt_for_password(text)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 605, in prompt_for_password
handle_prompt_abort("a connection or sudo password")
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 184, in handle_prompt_abort
abort(reason % "input would be ambiguous in parallel mode")
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: Needed to prompt for a connection or sudo password (host: 192.169.233.133), but input would be ambiguous in parallel modeFatal error: One or more hosts failed while executing task 'create'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.133), but input would be ambiguous in parallel modeAborting.
Connecting to server with ssh -A
and rerun of deploy didn't help.
Would be thankfull to any suggestions.