Puzzling ssh fail

オープン
#74 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
github-actions, php
領域
ci-cd, devops

調査の方向性

Start with the deploy.yml snippet and the deployphp/action@v1 entry point, then compare how its private-key input is passed to the SSH agent with the failing deploy log. Reproduce the authentication failure in GitHub Actions and verify that the deployment succeeds using the configured secrets.

索引モデルが issue の本文から書いたものです。

説明

This is the deploy snippet in my github deploy.yml

- name: Deploy
      uses: deployphp/action@v1
      with:
        private-key: ${{ secrets.PRIVATE_KEY }}
        dep: deploy ${{ secrets.SSH_HOST }} -o branch=main -o keep_releases=3 -vvv

PRIVATE_KEY and SSH_HOST are defined in my github actions secrets

However, I keep seeing this error in teh deploy log

Run deployphp/action@v1
$ ssh-agent -a /tmp/ssh-auth.sock
SSH_AUTH_SOCK=/tmp/ssh-auth.sock; export SSH_AUTH_SOCK;
SSH_AGENT_PID=3422; export SSH_AGENT_PID;
echo Agent pid 3422;
Using "vendor/bin/dep".
Invalid JSON in options
$ php vendor/bin/dep deploy *** -o branch=main -o keep_releases=3 -vvv --no-interaction --ansi -v 
task deploy:info
task deploy:setup
  [***] /usr/bin/php8.1 /home/runner/work/laravel-api/laravel-api/vendor/***/***/dep worker --port 40175 --task deploy:setup --host *** --option branch=main --option keep_releases=3 --ansi --no-interaction --decorated -vvv
  [***] ssh '-A' '-o' 'ControlMaster=auto' '-o' 'ControlPersist=60' '-o' 'ControlPath=/dev/shm/***@113.30.151.149' '***@113.30.151.149' ': 0f89c0c962742bac1f0b; bash -ls'
  [***] run [ -d /var/www/html ] || mkdir -p /var/www/html;
  cd /var/www/html;
  [ -d .dep ] || mkdir .dep;
  [ -d releases ] || mkdir releases;
  [ -d shared ] || mkdir shared;
  [***] Warning: Permanently added '113.30.151.149' (ED25519) to the list of known hosts.
  [***] Permission denied, please try again.
  [***] Permission denied, please try again.
  [***] ***@113.30.151.149: Permission denied (publickey,password).
  [***]  error  in setup.php on line 7:
  [***] exit code -1 (Unknown error)
ERROR: Task deploy:setup failed!
task deploy:failed
task deploy:unlock
ERROR: Task deploy:unlock failed!
Error: Failed: dep deploy,***,-o,branch=main,-o,keep_releases=3,-vvv

using sshpass-action I have confirmed it can actually login from teh deploy, and I've also tested locally using teh private key and it has no problems logging in..

Any suggestions as to where to look?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
主要言語
TypeScript
スター
269
フォーク
56
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

deployphp/action のほかの issue

deployphp/action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。