Skip to content

Truncates SSH Keys #122

@aleexharris

Description

@aleexharris

Have tried to use v3 of this action to load the private key of an SSH key that I am using as a GitHub deploy key. The key is being truncated to 167 characters, no matter if I export the key using environment variables or as a step output. I have verified that the key works by using it directly as a GitHub action secret.

Example failure:

- name: Log in to 1Password
  id: load_ssh_key
  uses: 1password/load-secrets-action@v3
  with:
    export-env: false
  env:
    SSH_KEY: op://cicd_github/github/private key

- name: Setup SSH agent with deploy key
  env:
    SSH_AUTH_SOCK: /tmp/ssh_agent.sock
  run: |
    ssh-agent -a $SSH_AUTH_SOCK > /dev/null
    ssh-add - <<< "${{ steps.load_ssh_key.outputs.SSH_KEY }}"
    mkdir -p ~/.ssh
    ssh-keyscan github.com >> ~/.ssh/known_hosts
    echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions