Skip to content

Add suport for checking out with SSH key  #72

Closed

Description

@danechitoaie

Hi,

Opening a separate issue based on discussion from #63
It would be really nice if checking out with a SSH key would also be supported.
It would make things a bit more secure. With a PAT you basically give access to all the repos that user has access. With a SSH key you could give access only to the specific repo the SSH key is setup for.
It can be a new input option to the checkout action that would temporarily (for the duration of the checkout action) create the ~/.ssh/id_rsa file with what was provided as input, use that for git clone and then restore the previous ~/.ssh/id_rsa (if any) after current checkout task is done.
Or maybe there's a better option.

Activity

  1. chrispat commented on Dec 5, 2019

    @chrispat
    Contributor

    I think this could be very useful to have.

  2. gunnsth commented on Dec 5, 2019

    @gunnsth

    This would be great for working with submodules too, currently when updating the submodules pulls up the http GitHub user credentials rather than using the SSH key. When working with the repository locally.

  3. added
    enhancement
    on Dec 13, 2019
  4. ericsciple commented on Feb 13, 2020

    @ericsciple
    Contributor

    proposed here: #156

  5. ericsciple commented on Mar 6, 2020

    @ericsciple
    Contributor

    related to #178 too

  6. ericsciple commented on Mar 11, 2020

    @ericsciple
    Contributor

    A new input ssh-key is in master now. Gathering feedback on this issue before moving v2 tag forward.

  7. neyb commented on Mar 15, 2020

    @neyb

    this is issue is not dedicated to submodules, while #176 is. So I decide to give a feedback here :

    edit: my bad : i was using @v2, and its only on @master

  8. neyb commented on Mar 15, 2020

    @neyb

    still got a problem :

    https://github.com/neyb/armor-hunter/runs/508953664#step:7:28

    the ssk key seems not to accessible for other repositories.
    this should cause submodules to fail I think

  9. ericsciple commented on Mar 19, 2020

    @ericsciple
    Contributor

    @neyb the SSH key isnt configured globally for the user. The SSH command is overwritten in the local git config. You could get it from the config and export to an env var if needed.

    export GIT_SSH_COMMAND=$(git config --local --get core.sshCommand)

  10. ericsciple commented on Mar 19, 2020

    @ericsciple
    Contributor

    Thanks all for the feedback! I updated V2 to include the recent submodule/SSH changes from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions