Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Experiment with SSH_KEY for excavator #49

Open
Ash258 opened this issue Aug 22, 2019 · 2 comments
Open

Experiment with SSH_KEY for excavator #49

Ash258 opened this issue Aug 22, 2019 · 2 comments

Comments

@Ash258
Copy link
Owner

Ash258 commented Aug 22, 2019

If repository contains protected master it will need to provide ssh key as secret.

if ($env:SSH_KEY) {
    Set-Content "$HOME\.ssh\id_rsa" $env:SSH_KEY -Encoding ASCII
} else {
    git config remote-url ... $user:$token
}

If it will work. Note, example and instructions how to add have to be added into Readme.

@Ash258 Ash258 added this to the 1.0.0 milestone Aug 22, 2019
@Ash258 Ash258 self-assigned this Aug 22, 2019
@Ash258
Copy link
Owner Author

Ash258 commented Sep 5, 2019

https://github.community/t5/GitHub-Actions/How-to-push-to-protected-branches-in-a-GitHub-Action/m-p/30710/highlight/true#M526

Maybe some workaround with SSH / machine user / whatever could work. Need to investigate

@Ash258 Ash258 mentioned this issue Sep 14, 2019
5 tasks
@Ash258 Ash258 removed this from the 1.0.0 milestone Oct 12, 2019
@Ash258
Copy link
Owner Author

Ash258 commented Oct 31, 2019

Try with workaround without hub first and then hacky way with hub

    $remote = "https://${env:GITHUB_ACTOR}:${env:GITHUB_TOKEN}@github.com/${env:GITHUB_REPOSITORY}.git"
    git push $remote

Actor needs to be admin

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

No branches or pull requests

1 participant