action-upterm
action-upterm copied to clipboard
macOS host: session dies as soon as I connect (transport: Error while dialing dial unix /Users/runner/.upterm/xxxxxxxxxxx.sock: connect: connection refused")
Hi!
Thanks for this action. I'm trying it out for the first time on macos-10.15
GHA runners, and as soon as I ssh
from my machine, the upterm session seems to die. Locally I simply get:
$ ssh szq1wc1331uu9SXcR9DY:[email protected]
Connection closed by 157.230.199.75 port 22
and in the GitHub Actions log (example: https://github.com/phil-blain/github-actions-debug/runs/5293251543?check_suite_focus=true#step:3:96)
Creating a new session. Connecting to upterm server ssh://uptermd.upterm.dev:22
Created new session successfully
Entering main loop
=== SZQ1WC1331UU9SXCR9DY
Command: tmux new -s upterm -x 132 -y 43
Force Command: tmux attach -t upterm
Host: ssh://uptermd.upterm.dev:22
SSH Session: ssh szq1wc1331uu9SXcR9DY:[email protected]
=== SZQ1WC1331UU9SXCR9DY
Command: tmux new -s upterm -x 132 -y 43
Force Command: tmux attach -t upterm
Host: ssh://uptermd.upterm.dev:22
SSH Session: ssh szq1wc1331uu9SXcR9DY:[email protected]
Error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /Users/runner/.upterm/szq1wc1331uu9SXcR9DY.sock: connect: connection refused"
Usage:
upterm session current [flags]
Aliases:
current, c
Examples:
# Display the current session defined in $UPTERM_ADMIN_SOCKET
upterm session current
# Display the current session with a custom path
1
upterm session current --admin-socket ADMIN_SOCKET_PATH
Flags:
--admin-socket string admin unix domain socket (required)
-h, --help help for current
time="2022-02-22T18:52:18Z" level=fatal msg="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /Users/runner/.upterm/szq1wc1331uu9SXcR9DY.sock: connect: connection refused\""
- This happens when I try to connect from macOS 10.11, 12.1, and also from Ubuntu 20.04.
- It does not happen if I use the
ubuntu-latest
GHA image. - It also happens if I use the
macos-latest
GHA image.
I see that on Linux, you use a fixed version of upterm: https://github.com/lhotari/action-upterm/blob/461637e743f8aaa8c577a596021e1fa8cfd7cd65/src/index.js#L21-L22 whereas on macOS you simply install whatever upterm's Homebrew tap has: https://github.com/lhotari/action-upterm/blob/461637e743f8aaa8c577a596021e1fa8cfd7cd65/src/index.js#L24-L25.
So maybe that's caused by a regression in upterm...
OK, so I forked the action and replaced the brew install
above by the same curl
call as for Linux, but downloading the appropriate release for macOS (upterm_darwin_amd64.tar.gz
). And with that, connecting did work !
So it is definitely a regression in upterm, I would think.
I run into the same issue. I would help perhaps if I could pass the version to install to the action
This might be an issue with the ssh key type. See #9 for more details. There's also some notes about RSA keys in the README of upterm. The workaround is to use an Ed25519 key.
Here's the example of a successful connection: https://github.com/lhotari/github-actions-debug/runs/5640278819?check_suite_focus=true#step:3:111
After the client disconnects, the log output is similar to what is described in this issue.
I tested with macos-latest
, this was my workflow yaml: https://github.com/lhotari/github-actions-debug/blob/22a32d44acbcf23647eae1ef9ce31a48a8f7fbf7/.github/workflows/ci.yml
I got this error the first time I tried it, but it turns out I hadn’t configured my SSH public key in my GitHub profile. Go to your account settings and click on “SSH and GPG keys” in the navigation bar, then click “New SSH key” and paste the contents of your ~/.ssh/id_rsa.pub
file.
Unfortunately I ran into another issue:
Permission denied (publickey)
which I suspect is due to the key type not being supported as @lhotari suggested in the earlier post. Now I just need to figure out how to generate a SHA-1 or Ed25519 key…