0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

お題は不問!Qiita Engineer Festa 2024で記事投稿!
Qiita Engineer Festa20242024年7月17日まで開催中!

GitHubActionsでdial tcp ***:***: i/o timeoutが起きてデプロイに失敗する場合

Posted at

GitHub Actionsでデプロイする際に、SSHの鍵にパスフレーズを設定している場合にパスフレーズもレポジトリの設定に登録しないとタイムアウトしてしまうようです。

name: CI

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Deploy
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.SERVER_HOST }}
          username: ${{ secrets.SERVER_USERNAME }}
          port: ${{ secrets.SSH_PORT }}
          key: ${{ secrets.SSH_PRIVATE_KEY }}
          passphrase: ${{ secrets.SSH_PASSPHRASE }} ← これを追加
          script: |
            cd ${{ secrets.SERVER_DEPLOY_DIR }}
            git pull origin main

ある時までエラーなくデプロイ出来ていたので、まさかパスフレーズが原因とは思いませんでした。(サーバ移行のタイミングでパスフレーズ付きの鍵にしていたのかな)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?