1

我正在尝试将我的build应用程序应用于实例。deploymeteorAWS EC2

现在在我的Github Action文件中,我有ssh-private-key这样ssh-private-key: ${{ secrets.DEV_SSHKEY }}的,在mup.js文件中我也有这样的 pem 文件pem: '~/.ssh/dev-server'

这是我的Github Action文件或.yaml文件

 on:
  push:
    branches:
    - dev

jobs:
  build:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Setup meteor
      uses: meteorengineer/setup-meteor@v1
      with:
        meteor-release: '1.8.1'

    # install backend/meteor dependencies 
    - name: Install meteor dependencies
      run: cd meteor-api && meteor npm i && cd ..

    - name: Install Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '14'

    # install mup 
    - name: Install mup
      run : npm i -g mup

    - uses: webfactory/ssh-agent@v0.5.3
      with:
        ssh-private-key: ${{ secrets.DEV_SSHKEY }}

    - name: Production Build
      run: cd meteor-api/.deploy/Prod

    # mup Create
    - name: mup Create
      run: mup init

    # mup setup
    - name: mup setup
      run: mup setup

    # mup deploy
    - name: mup deploy
      run: mup deploy

这是我的mup.js文件

module.exports = {
  servers: {
    one: {
      host: '13.53.xxx.xxx',
      username: 'ubuntu',
      pem: '~/.ssh/dev-server'
      //password: 'password'
      // or neither for authenticate from ssh-agent
    }
  },

  meteor: {
    name: 'xx',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      ROOT_URL: "http://xx-api.xx.com/",
      NODE_ENV: "production",
      MAIL_URL: "smtp://xxx:xx/eLPCB3nw3jubkq:@email-smtp.eu-north-1.amazonaws.com:587",
      MONGO_URL: "mongodb://localhost/meteor",
      appUrl : 'http://dev.xx.com/'
    },
    deployCheckWaitTime: 60,

    docker: {
      image: 'abernix/meteord:base',
    },
    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  },
};

这是我收到的错误 -

Run mup setup   mup setup   shell: /usr/bin/bash -e {0}   env:
   SSH_AUTH_SOCK: /tmp/ssh-jevCuspvC6uY/agent.1829
   SSH_AGENT_PID: 1830

Started TaskList: Setup Docker [1.2.3.4] - Setup Docker events.js:377
     throw er; // Unhandled 'error' event
     ^

Error: Timed out while waiting for handshake
   at Timeout._onTimeout (/opt/hostedtoolcache/node/14.17.4/x64/lib/node_modules/mup/node_modules/ssh2/lib/client.js:695:19)
   at listOnTimeout (internal/timers.js:557:17)
   at processTimers (internal/timers.js:500:7) Emitted 'error' event on Client instance at:
   at Timeout._onTimeout (/opt/hostedtoolcache/node/14.17.4/x64/lib/node_modules/mup/node_modules/ssh2/lib/client.js:697:14)
   at listOnTimeout (internal/timers.js:557:17)
   at processTimers (internal/timers.js:500:7) {   level: 'client-timeout' } Error: Process completed with exit code 1.

现在我的问题是我在这里做错了什么导致此身份验证错误或meteor不是?compatibleAWS EC2 ubuntu environment

有谁知道这个挑战的任何解决方案?

4

0 回答 0