Skip to main content
All CollectionsKnowledge BaseGeneral issues
Git Clone failures on Ventura via SSH
Git Clone failures on Ventura via SSH
Updated over a week ago

If you're trying to clone a Git repository on a Ventura virtual machine via SSH and encounter errors like "Host key verification failed" or "no matching host key type found. Their offer: ssh-rsa", you're likely running into a compatibility issue with the Ventura OS's SSH configuration.

Ventura has disabled the use of the SHA1 algorithm, which is commonly used in SSH authentication. As a result, SSH connections to remote hosts that only support SHA1 may fail. However, you can resolve this issue by modifying the SSH configuration on your Ventura machine.

In this article, we'll guide you through the workaround to resolve these errors and successfully clone Git repositories on Ventura machines.

Use the following script to modify the SSH configuration

#!/usr/bin/env bash

cd /Users/vagrant/git
ls -ltr
ls -a
cat .git/config
echo ssh
cd /Users/vagrant/
ls -a
cd .ssh
ls -a
cat config
echo before
a=' '
echo "Host *" >> config
echo "UseKeychain yes" >> config
# Don't forget to edit host name with your own
echo "Host {Host name}" >> config
echo "${a}User git" >> config
echo "${a}PubkeyAcceptedAlgorithms +ssh-rsa" >> config
echo "${a}HostkeyAlgorithms +ssh-rsa" >> config

This script navigates to the .ssh directory on your Ventura machine, opens the config file, and adds the required lines to enable the ssh-rsa algorithm for host key and public key authentication.

To use this script, you can add a Script step with the contents above prior to your failing step.

Conclusion

After integrating this script and modifying the SSH configuration, you should be able to utilize SSH authentication once more and reach the intended repository πŸš€.
​
Happy Building πŸ’œ

Did this answer your question?