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

Authentication failed #46

Closed
C10ne opened this issue Oct 25, 2022 · 3 comments
Closed

Authentication failed #46

C10ne opened this issue Oct 25, 2022 · 3 comments

Comments

@C10ne
Copy link
Contributor

C10ne commented Oct 25, 2022

Hi,

I'm trying to switch to latest version and ed25519 cypher key, but in two different repositories action fails to connect to server. With old keys everything works.

Steps:

ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_ed25519.pub #add to deploy keys
openssl enc -aes-256-cbc -md sha512 -salt -in ~/.ssh/id_ed25519 -out deploy_id_ed25519_enc -k "PASSWORD" -a -pbkdf2 #used PASSWORD for testing
cat deploy_id_ed25519_enc #added to repository
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

Result:

/opt/hostedtoolcache/Ruby/2.6.10/x64/bin/bundle exec cap staging deploy
00:00 git:wrapper
      01 mkdir -p /tmp/Mod24_Blog/

...

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Authentication failed for user [email protected]


Caused by:
Net::SSH::AuthenticationFailed: Authentication failed for user [email protected]

My YAML:

...
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]
    - name: Set up Ruby
      uses: ruby/[email protected]
      with:
        ruby-version: 2.6
        bundler-cache: true
    - uses: miloserdow/capistrano-deploy@master
      with:
        target: staging
        enc_rsa_key_pth: 'config/deploy/keys/deploy_staging_enc'
        deploy_key: ${{ secrets.TEST_DEPLOY_KEY }}

Is there something else that needs to be changed? Any ideas?

@gildesmarais
Copy link

Hey, can you check #42 and see if the fix there solves your problem? :)

@C10ne
Copy link
Contributor Author

C10ne commented Oct 26, 2022

Hey, can you check #42 and see if the fix there solves your problem? :)

No, unfortunately this is different error, but might be something with mismatching versions.

@C10ne
Copy link
Contributor Author

C10ne commented Oct 26, 2022

Yeah, in the end net-ssh was the culprit, after updating capistrano version it's able to connect.

@C10ne C10ne closed this as completed Oct 26, 2022
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

2 participants