Giter VIP home page Giter VIP logo

Comments (6)

mpdude avatar mpdude commented on August 28, 2024 1

My guess would be that there is no benefit of having this in this central action. I've added a note at https://github.com/webfactory/ssh-agent/blob/master/README.md#run-ssh-keyscan-to-add-host-keys-for-additional-hosts.

from ssh-agent.

mpdude avatar mpdude commented on August 28, 2024

I don't know about pm2. Does that SSH into another machine? Does Host key verification failed. happen there?

from ssh-agent.

pke avatar pke commented on August 28, 2024

Yes it does SSH into the machine the app should be deployed on. The error happens there

from ssh-agent.

mpdude avatar mpdude commented on August 28, 2024

Then you need to find a way how to provision your known_hosts key there. I am afraid this action cannot do this for you.

from ssh-agent.

pke avatar pke commented on August 28, 2024

Ok, thanks for taking the time. I'll try over at pm2 repo to find some answers.

from ssh-agent.

pke avatar pke commented on August 28, 2024

Ok I figured something out. After disabling strict host checking in my pm2 ecosytem file I got this output:

[PM2] Spawning PM2 daemon with pm2_home=/home/runner/.pm2
[PM2] PM2 Successfully daemonized
--> Deploying to production environment
--> on host MY.SERVER
fatal: HEAD does not point to a branch
  ○ deploying origin/master
  ○ executing pre-deploy-local
  ○ hook pre-deploy
Warning: Permanently added '[MY.SERVER]:36077,[45.10.26.70]:36077' (ECDSA) to the list of known hosts.

So it seems the problem was that host that I wanted deploy to (MY.SERVER) was not in the list of known_hosts on the GH build instance.
Is that something this action could also take care of? Like it does with adding the private key to the ssh-agent?

The script could do ssh-keyscan -t rsa MY.SERVER | ssh-keygen -lf - to add the server to known_hosts file.

from ssh-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.