This is a public announcement from Arrikto informing the MiniKF community members that starting from 12 April 2022, MiniKF VMs both new & existing ones fail on startup with an error.
Summary
The Ubuntu operating system released a security update to the git package and as a result it causes the following error with MiniKF:
An unexpected exception has occurred
Line: /usr/local/lib/python3.6/dist-packages/git/cmd.py:928
Type: GitCommandError
Reason: Cmd('git') failed due to: exit code(129)
cmdline: git diff --cached --abbrev=40 --full-index --raw
stderr: 'Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>'
The logfile `/home/minikf/provision.log' may contain more information on this error, including a backtrace.
*** MiniKF provisioning tool terminated. Press Enter to restart, Ctrl-C to exit... ***
The cause is a security upgrade to the git
package in Ubuntu on 12 Apr 2022, to fix CVE-2022-24765 (https://ubuntu.com/security/CVE-2022-24765).
The fix results in a user being unable to run git commands in a git repo that is owned by another user. However MiniKF has a local GitOps repository that multiple users need to access.
To keep the previous desired behaviour, users have to manually mark the GitOps repository as safe to be used by multiple users, following the procedure described below:
Workaround
Git has added the safe.directory
option Git - git-config Documentation:
These config entries specify Git-tracked directories that are considered safe even if they are owned by someone other than the current user.
With that in mind, the suggested workaround for MiniKF is:
Procedure
-
Make sure you are in the MiniKF setup screen, with the above error message.
-
Press
Ctrl+B
, thenc
. You will see a new prompt. -
Mark the
/data/deployments
directory as safe even if owned by a different user:minikf@minikf:~$ git config --global --add safe.directory /data/deployments
-
Type
exit
to close the terminal:minikf@minikf:~$ exit
- You should now see the MiniKF setup screen again, still showing the error message.
- Press
Enter
to restart the MiniKF setup process.
Verify
-
Verify the
/data/deployments
directory is marked as safe in Git:minikf@minikf:~$ grep "directory = /data/deployments" ~/.gitconfig directory = /data/deployments
Next Steps
Arrikto will be pushing a new version of MiniKF that will take this fix into account. Check back or follow this KB article to get notified when Arrikto pushes the new marketplace images to all of the support public clouds.
Comments
0 comments
Please sign in to leave a comment.