@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.
Reason
Github has replaced their RSA SSH host key used to secure Git operations for GitHub.com. Details here
These host keys are stored in odoo/custom/ssh/known_hosts file.
Solution
Need to replace existing host keys in odoo/custom/ssh/known_hosts file
If you see the above message, you’ll need to remove the old key by running this command:
Describe the bug
invoke git-aggregate is failing for GitHub repos.
To Reproduce
Run invoke git-aggregate
Below error is shown:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s. Please contact your system administrator. Add correct host key in ~/.ssh/known_hosts to get rid of this message. Host key for github.com has changed and you have requested strict checking. Host key verification failed.
Reason
Github has replaced their RSA SSH host key used to secure Git operations for GitHub.com. Details here
These host keys are stored in odoo/custom/ssh/known_hosts file.
Solution
Need to replace existing host keys in odoo/custom/ssh/known_hosts file
If you see the above message, you’ll need to remove the old key by running this command:
ssh-keygen -R github.com -f "odoo/custom/ssh/known_hosts"
Or manually updating your odoo/custom/ssh/known_hosts file to remove the old entry.
Then, you can manually add the following line to add the new RSA SSH public key entry to your odoo/custom/ssh/known_hosts file:
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
Alternative method (Recommended)
Make sure jq is installed on host machine.
sudo apt install jq
Automatically update GitHub.com’s RSA SSH key in your odoo/custom/ssh/known_hosts, by running the following in your terminal:
ssh-keygen -R github.com -f "odoo/custom/ssh/known_hosts"
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> odoo/custom/ssh/known_hosts
The above command will add new entries with updated host keys.
Run
invoke git-aggregate
again to verify.