Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub have updated their RSA SSH host key #101

Open
brendanator opened this issue Mar 27, 2023 · 0 comments
Open

GitHub have updated their RSA SSH host key #101

brendanator opened this issue Mar 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@brendanator
Copy link

brendanator commented Mar 27, 2023

馃 Bug report

Summary

GitHub changes their SSH RSA host key - https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

The old host key is hard coded here -

"github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==";

This action now fails because it cannot connect via SSH

Please make sure you have the correct access rights
and the repository exists.

Expected behavior

It runs

Actual behavior

The GitHub action fails with:

docker.io/olivr/copybara:latest
/usr/bin/docker run -v /home/runner/work/core/core:/usr/src/app -v /home/runner/.ssh/id_rsa:/root/.ssh/id_rsa -v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts -v /home/runner/copy.bara.sky:/root/copy.bara.sky -v /home/runner/.gitconfig:/root/.gitconfig -v /home/runner/.git-credentials:/root/.git-credentials -e COPYBARA_CONFIG=/root/copy.bara.sky -e COPYBARA_WORKFLOW=push -e COPYBARA_OPTIONS olivr/copybara copybara
Mar 27, 2023 9:09:30 AM com.google.copybara.Main configureLog
INFO: Setting up LogManager
Copybara source mover (Version: Unknown version)
0327 09:09:30.825 TASK: Cleaning output directory
0327 09:09:30.838 TASK: Running migrate
0327 09:09:30.840 TASK: Loading config /root/copy.bara.sky
0327 09:09:30.991 TASK: Validating configuration
0327 09:09:30.994 TASK: Getting last revision: Resolving origin reference
0327 09:09:30.995 TASK: Git Origin: Initializing local repo
0327 09:09:33.839 TASK: Git Destination: Fetching: [email protected]:sourcery-ai/sourcery-rules.git refs/heads/main
0327 09:09:33.915 ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for github.com has changed,
and the key for the corresponding IP address 140.[82](https://github.com/sourcery-ai/core/actions/runs/4523471705/jobs/7979921608#step:3:83).112.3
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:1
  remove with:
  ssh-keygen -f "/root/.ssh/known_hosts" -R "github.com"
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Steps to reproduce the problem

Environment

  • Version:

Possible fix

Change the githubKnownHost to the new value found here

@brendanator brendanator added the bug Something isn't working label Mar 27, 2023
emanb29 added a commit to thatdot/copybara-action that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant