lhotari / action-upterm

Debug your GitHub Actions via SSH by using upterm/tmux to get access to the runner system itself.
MIT License
402 stars 34 forks source link

macOS only works *without* authentication #29

Open alerque opened 3 weeks ago

alerque commented 3 weeks ago

Enabling authentication makes the action fail on macOS:

Example configuration has been installed to:
  /opt/homebrew/opt/tmux/share/tmux
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d
Auto-generating ~/.ssh/known_hosts by attempting connection to uptermd.upterm.dev
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'uptermd.upterm.dev' (ED25519) to the list of known hosts.
runner@uptermd.upterm.dev: Permission denied (publickey).
Adding actor "alerque" to allowed users.
Fetching SSH keys registered with GitHub profiles: alerque
Fetched 1 ssh public keys
Creating a new session. Connecting to upterm server ssh://uptermd.upterm.dev:22
no server running on /private/tmp/tmux-501/default
Error: 1

The same workflow run on ubuntu-latest works just fine, but macos-latest fails. Removing the authentication requirement also works fine even on macos.

ipatch commented 1 week ago

pretty sure i just hit this same issue,

Run lhotari/action-upterm@v1
  with:
    limit-access-to-actor: true
    wait-timeout-minutes: 10
    GITHUB_TOKEN: ***
    upterm-server: ssh://uptermd.upterm.dev:22
  env:
    HOMEBREW_NO_ANALYTICS: 1
    HOMEBREW_NO_AUTO_UPDATE: 1
    HOMEBREW_NO_INSTALL_CLEANUP: 1
    HOMEBREW_NO_INSTALL_FROM_API: 
    HOMEBREW_DEVELOPER: 1
    date: 2024-10-10T19:38:14
    HOMEBREW_GITHUB_API_TOKEN: ***

==> Tapping owenthereal/upterm
Cloning into '/opt/homebrew/Library/Taps/owenthereal/homebrew-upterm'...
Tapped 1 formula (13 files, 33.5KB).
==> Fetching owenthereal/upterm/upterm
==> Downloading https://github.com/owenthereal/upterm/releases/download/v0.14.3/upterm_darwin_arm64.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/218876111/d2094f1f-6eb0-41c4-ac68-65ee99b3f637?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241010%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241010T194614Z&X-Amz-Expires=300&X-Amz-Signature=55dfbc19bf2d428f680f27bd97b7ee68d515ad7b49927382dc3d951f87683b4f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dupterm_darwin_arm64.tar.gz&response-content-type=application%2Foctet-stream
==> Installing upterm from owenthereal/upterm
==> Caveats
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d
==> Summary
🍺  /opt/homebrew/Cellar/upterm/0.14.3: 18 files, 14.1MB, built in 1 second
==> Downloading https://ghcr.io/v2/homebrew/core/tmux/manifests/3.5a
==> Fetching dependencies for tmux: ca-certificates, openssl@3, libevent, ncurses and utf8proc
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2024-09-24
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/338dad7c2ff7c822cda7c417944521589856741c0fbd7a7f07b88a18d7fb7e05--ca-certificates-2024-09-24.bottle_manifest.json
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:212f2576348d5f5797d8d3905eb70d0d9bf8829345bce9e20e2fd0336f344648
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/a42908db56776e38039ac5f25968df8df16307650c519973b7d5ed689a293c88--ca-certificates--2024-09-24.all.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.3.2
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/15a43beab5e5017b1a9fe7584ff44a48195632fd196c23ee0e5e7ecf67e9ef2a--openssl@3-3.3.2.bottle_manifest.json
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:df4760f0256178172f6193d8bb6c4cbeffd78ac646926ad345c5170331c5d55c
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/a8b376773d0e2bb72b72a290e10195947ba95b9c523c1c7d7b8e7456fe162f73--openssl@3--3.3.2.arm64_sonoma.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/libevent/manifests/2.1.12_1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/68b113f9ab63db45f4e1860de522ce2ca4fa081eb3c0d5c7d6005a35c3cf8d06--libevent-2.1.12_1.bottle_manifest.json
==> Fetching libevent
==> Downloading https://ghcr.io/v2/homebrew/core/libevent/blobs/sha256:38a3eb3510a7e0cd4096e4592d0095c562eb1bbad572d951f1923009a14ad702
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/8f8cf3b39994cf101de2b62af12e73a6382f97b486014945519507699919941d--libevent--2.1.12_1.arm64_sonoma.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ncurses/manifests/6.5
==> Fetching ncurses
==> Downloading https://ghcr.io/v2/homebrew/core/ncurses/blobs/sha256:ee5253473badfa0701deac8e9973a7358c761dd287f0d748f753130a7a6d2705
==> Downloading https://ghcr.io/v2/homebrew/core/utf8proc/manifests/2.9.0
==> Fetching utf8proc
==> Downloading https://ghcr.io/v2/homebrew/core/utf8proc/blobs/sha256:cde8cdd879129b6e34ced18440c8149e180175ef74c42c560d8139382971aeb9
==> Fetching tmux
==> Downloading https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:58e253aca23e3deb4b6e171419047cba7283a51cba51962351f5e51661d53437
==> Installing dependencies for tmux: ca-certificates, openssl@3, libevent, ncurses and utf8proc
==> Installing tmux dependency: ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2024-09-24
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/338dad7c2ff7c822cda7c417944521589856741c0fbd7a7f07b88a18d7fb7e05--ca-certificates-2024-09-24.bottle_manifest.json
==> Pouring ca-certificates--2024-09-24.all.bottle.tar.gz
==> R
egenerating CA certificate bundle from keychain, this may take a while...
🍺  /opt/homebrew/Cellar/ca-certificates/2024-09-24: 4 files, 237.5KB
==> Installing tmux dependency: openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.3.2
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/15a43beab5e5017b1a9fe7584ff44a48195632fd196c23ee0e5e7ecf67e9ef2a--openssl@3-3.3.2.bottle_manifest.json
==> Pouring openssl@3--3.3.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openssl@3/3.3.2: 6,984 files, 32.5MB
==> Installing tmux dependency: libevent
==> Downloading https://ghcr.io/v2/homebrew/core/libevent/manifests/2.1.12_1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/68b113f9ab63db45f4e1860de522ce2ca4fa081eb3c0d5c7d6005a35c3cf8d06--libevent-2.1.12_1.bottle_manifest.json
==> Pouring libevent--2.1.12_1.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libevent/2.1.12_1: 58 files, 2.2MB
==> Installing tmux dependency: ncurses
==> Downloading https://ghcr.io/v2/homebrew/core/ncurses/manifests/6.5
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/b2f8ce4e08b15832435170efd265346225ee388d5baab3d5c50e3a77c5673b5a--ncurses-6.5.bottle_manifest.json
==> Pouring ncurses--6.5.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ncurses/6.5: 4,052 files, 9.9MB
==> Installing tmux dependency: utf8proc
==> Downloading https://ghcr.io/v2/homebrew/core/utf8proc/manifests/2.9.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/cc0d93c9e41f609c06bdb60811acec4d26281218bbc70fb8196fd788f238fbcc--utf8proc-2.9.0.bottle_manifest.json
==> Pouring utf8proc--2.9.0.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/utf8proc/2.9.0: 11 files, 771.2KB
==> Installing tmux
==> Pouring tmux--3.5a.arm64_sonoma.bottle.tar.gz
==> Caveats
Example configuration has been installed to:
  /opt/homebrew/opt/tmux/share/tmux
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d
==> Summary
🍺  /opt/homebrew/Cellar/tmux/3.5a: 10 files, 1.2MB
==> Caveats
==> tmux
Example configuration has been installed to:
  /opt/homebrew/opt/tmux/share/tmux
Bash completion has been installed to:
  /opt/homebrew/etc/bash_completion.d
Auto-generating ~/.ssh/known_hosts by attempting connection to uptermd.upterm.dev
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'uptermd.upterm.dev' (ED25519) to the list of known hosts.
runner@uptermd.upterm.dev: Permission denied (publickey).
Adding actor "ipatch" to allowed users.
Fetching SSH keys registered with GitHub profiles: ipatch
Fetched 1 ssh public keys
Creating a new session. Connecting to upterm server ssh://uptermd.upterm.dev:22
no server running on /private/tmp/tmux-501/default
Error: 1

https://github.com/FreeCAD/homebrew-freecad/actions/runs/11280597016/job/31374679120