-
Notifications
You must be signed in to change notification settings - Fork 42
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format of known_hosts #14
Comments
Sorry to have missed this for so long, I thought I definitely responded to this before. The So, you just need to follow the standard convention. You can probably just copy/paste the host from your own The format is like
For example for GitHub.com you can use this:
|
Hello, I encounter the same issue @catchMyException described, using a copy of my own know_hosts file or the result of the Copying what is in GIT_SSH_KNOWN_HOSTS to a known_hosts file via ssh <user>@<host> -p <port> -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=known_hosts I'll take a look at your code to see whether a quick fix is possible for me to PR. My GH workflow: name: Mirror the repository
on:
push:
branches: [ main ]
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Mirror'
uses: spyoungtech/mirror-action@master
with:
REMOTE: ${{ secrets.REMOTE }}
GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
GIT_SSH_KNOWN_HOSTS: ${{ secrets.GIT_SSH_KNOWN_HOSTS }}
# GIT_SSH_NO_VERIFY_HOST: "true"
DEBUG: "true" |
I found what the problem was and made a PR. Using non-explicit path for the Check the PR #19 I would be very glad if you could accept it soon as I will have to GIT_SSH_NO_VERIFY_HOST in the mean time. |
Set up GitHub Action to automatically mirror changes to master branch to GitLab and Codeberg repositories. Checking host keys is disabled because of yesolutions/mirror-action#14, but this shouldn't be a problem (the code is public anyway).
Set up GitHub Action to automatically sync changes to master branch to ARver mirrors at GitLab and Codeberg. It is not possible to sync both GitLab and Codeberg using one checkout, because the action attempts to create a remote named "mirror" twice in the same repository clone, which fails. For this reason two separate sync jobs are required. Checking host keys is disabled because of yesolutions/mirror-action#14, but this shouldn't be a problem (ARver code is public anyway).
Set up GitHub Action to automatically sync changes to master branch to ARver mirrors at GitLab and Codeberg. It is not possible to sync both GitLab and Codeberg using one checkout, because the action attempts to create a remote named "mirror" twice in the same repository clone, which fails. For this reason two separate sync jobs are required. Checking host keys is disabled because of yesolutions/mirror-action#14.
If I run
- run: for ip in $(dig @8.8.8.8 gitlab.evilcorp.de +short);
do ssh-keyscan gitlab.evilcorp.de,$ip; ssh-keyscan $ip; done
And paste the output:
#gitlab.evilcorp.de:22 SSH-2.0-OpenSSH_8.2p1
gitlab.evilcorp.de,IP ssh-ed25519 AAA...
gitlab.evilcorp.de,IP ssh-rsa AAA...
IP ssh-ed25519 AAA...
IP ssh-rsa AAA...
... to GIT_SSH_KNOWN_HOSTS, mirror-action fails with:
Host key verification failed.
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
BUT if I run mirror-action with
GIT_SSH_NO_VERIFY_HOST: "true"
it runs without errors.I also pulled my repo to my machine, accepted the fingerprint and copied the .ssh/known_hosts to my secrets. The according file was differently formatted (|1| 3Wm...=|z+s...= ecdsa-sha2-nistp256 PubKey) but also won't work.
Any suggestions on how to fix this?
P.S. My Script:
steps:
- uses: actions/checkout@v1
- uses: spyoungtech/mirror-action@master
with:
REMOTE: 'ssh://[email protected]/group/repo.git'
GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
GIT_SSH_KNOWN_HOSTS: ${{ secrets.GIT_SSH_KNOWN_HOSTS }}
DEBUG: "true"
The text was updated successfully, but these errors were encountered: