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

Add option to use SSH for cloning repo #75

Merged
merged 12 commits into from
Sep 13, 2023

Conversation

RayaneB75
Copy link
Contributor

@RayaneB75 RayaneB75 commented Aug 7, 2023

New env vars available :

  • Setting PLUGIN_USE_SSH to true enables SSH cloning
  • Setting PLUGIN_SSH_KEY to the path of a custom SSH Key

This PR uses the new CI_REPO_CLONE_SSH_URL env var to the path of the clone ssh url

closes #58

@Nutomic
Copy link

Nutomic commented Aug 11, 2023

This might also help with #69 assuming that Github doesnt cache ssh responses.

@RayaneB75
Copy link
Contributor Author

This might also help with #69 assuming that Github doesnt cache ssh responses.

Has to be tested tho, because I don't reckon any reason why GIthub might process caching differently between SSH and HTTPS cloning

plugin.go Outdated Show resolved Hide resolved
@qwerty287
Copy link
Contributor

@RayaneB75 I just opened woodpecker-ci/woodpecker#2198 which will add a new env var CI_REPO_CLONE_URL_SSH that contains the SSH clone URL. I would suggest to wait for this PR and then switch to the new env var here.

6543 pushed a commit to woodpecker-ci/woodpecker that referenced this pull request Aug 12, 2023
@anbraten
Copy link
Member

Why do you want to clone via ssh instead of https?

main.go Outdated Show resolved Hide resolved
@RayaneB75 RayaneB75 changed the title Add option to use SSH for cloning repo Add option to use SSH for cloning repo (revert some previous commits) Aug 16, 2023
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
types.go Outdated Show resolved Hide resolved
@qwerty287 qwerty287 changed the title Add option to use SSH for cloning repo (revert some previous commits) Add option to use SSH for cloning repo Aug 21, 2023
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
main.go Show resolved Hide resolved
Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@6543 you wanna review again?

@woodpecker-bot
Copy link
Contributor

🎉 This PR is included in version 2.2.0 🎉

The release is now available here

Thank you for your contribution. ❤️📦🚀

@6543 6543 mentioned this pull request Dec 31, 2023
6543 added a commit that referenced this pull request Dec 31, 2023
was added back in 2.2.0  ( #75 )


---------

Co-authored-by: 6543 <6543@obermui.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH key auth
6 participants