【发布时间】:2021-03-27 00:57:54
【问题描述】:
Github Actions runner 通过 SSH 连接到创建的 Droplet。
我的步骤:
ssh-keygen -t rsa -f ~/.ssh/KEY_NAME -P ""doctl compute ssh-key create KEY --public-key "CONTENT OF KEY_NAME.pub"doctl compute droplet create --image ubuntu-20-04-x64 --size s-1vcpu-1gb --region fra1 DROPLET_NAME --ssh-keys FINGERPRINT --waitssh -vvv -i ~/.ssh/KEY_NAME root@DROPLET_IP
✔️ 使用从 cmd 运行的 doctl.exe 在 Windows 本地计算机上测试 - 有效!
✔️ 使用 doctl 脚本在基于 Linux 映像的 Docker(安装在 Windows 上)测试 - 有效!
⚠️ 使用 digitalocean/action-doctl 脚本在基于 ubuntu-latest 的 Github Actions 运行器上测试 - 不起作用!
收到的消息是:connect to host ADDRESS_IP port 22: Connection refused。
所以步骤是正确的,为什么这对 Github Actions 不起作用?
【问题讨论】:
标签: ssh digital-ocean github-actions ssh-keygen droplet