Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't get connection url only ssh #163

Open
Set27 opened this issue Jun 3, 2023 · 4 comments
Open

Don't get connection url only ssh #163

Set27 opened this issue Jun 3, 2023 · 4 comments

Comments

@Set27
Copy link

Set27 commented Jun 3, 2023

ssh [email protected]

Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]
or: ssh -i <path-to-private-SSH-key> [email protected]
SSH: ssh [email protected]

when I try to connect via console it's also failed

@mxschmitt
Copy link
Owner

How does your workflow file look like?

@Set27
Copy link
Author

Set27 commented Jun 3, 2023

How does your workflow file look like?

name: CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  ACTIONS_STEP_DEBUG: true

jobs:
  validate-backend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Fetch secrets from tawbar
        run: |
          curl 
          curl
      - name: Build docker images
        run: docker compose build backend

      - name: Install gems
        run: bin/backend/bundle install

      - name: Run rubocop
        run: bin/backend/lint

      - name: Prepare database
        run: bin/backend/run "bundle exec rake db:prepare"

      - name: Setup tmate session
        uses: mxschmitt/[email protected]

      - name: Run tests
        run: bin/backend/test

  validate-frontend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Fetch secrets from tawbar
        run: |
          curl
          curl
      - name: Build docker images
        run: docker compose build --build-arg UID=$UID frontend

      - name: Install dependencies
        run: bin/frontend/yarn install

      - name: Build vite
        run: bin/frontend/yarn build

      - name: Run svelte-check
        run: bin/frontend/check

      - name: Run linter
        run: bin/frontend/lint

@memchr
Copy link

memchr commented Jul 26, 2023

I'm also getting this behaviour when using the Arch container. Just ssh commands spamming out output in quick succession, and they don't work.
Can be produced by this minial workflow

name: test
on:
  workflow_dispatch:

jobs:
  tmate_test:
    runs-on: ubuntu-22.04
    container: 
      image: archlinux:base-devel 
    steps
      - name: Setup tmate session
        uses: mxschmitt/action-tmate@v3

@memchr
Copy link

memchr commented Jul 26, 2023

Oops, I just found out that this action uses the ssh public key from the github account as authorised_keys. And since I changed my ~/.ssh/config to make ssh use ${HOME}/.ssh/github for host github.com, which is different from the default private key used for tmate.io, ssh is unable to connect to the tmate.io ssh link. And I think this is also the reason why the http link does not work.

ssh -G github.com | grep identityfile 
identityfile ${HOME}/.ssh/github

Finally, I need to use the -i flag to specify which private key to use.

ssh -i github [email protected]

Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants