You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ jobs:
127
127
128
128
## Use registered public SSH key(s)
129
129
130
-
By default anybody can connect to the tmate session. You can opt-in to install the public SSH keys [that you have registered with your GitHub profile](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).
130
+
If [you have registered one or more public SSH keys with your GitHub profile](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account), tmate will be started such that only those keys are authorized to connect, otherwise anybody can connect to the tmate session. If you want to require a public SSH key to be installed with the tmate session, no matter whether the user who started the workflow has registered any in their GitHub profile, you will need to configure the setting `limit-access-to-actor` to `true`, like so:
Copy file name to clipboardExpand all lines: action.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ inputs:
16
16
required: false
17
17
default: 'true'
18
18
limit-access-to-actor:
19
-
description: 'If only the public SSH keys of the user triggering the workflow should be authorized'
19
+
description: 'Whether to authorize only the public SSH keys of the user triggering the workflow (defaults to true if the GitHub profile of the user has a public SSH key)'
20
20
required: false
21
-
default: 'false'
21
+
default: 'auto'
22
22
tmate-server-host:
23
23
description: 'The hostname for your tmate server (e.g. ssh.example.org)'
throw new Error(`No public SSH keys registered with ${actor}'s GitHub profile`)
12645
+
if (limitAccessToActor === "auto") publicSSHKeysWarning = `No public SSH keys found for ${actor}; continuing without them even if it is less secure (please consider adding an SSH key, see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)`
12646
+
else throw new Error(`No public SSH keys registered with ${actor}'s GitHub profile`)
thrownewError(`No public SSH keys registered with ${actor}'s GitHub profile`)
94
+
if(limitAccessToActor==="auto")publicSSHKeysWarning=`No public SSH keys found for ${actor}; continuing without them even if it is less secure (please consider adding an SSH key, see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)`
95
+
elsethrownewError(`No public SSH keys registered with ${actor}'s GitHub profile`)
0 commit comments