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

feature: ssh access to git repository #92

Closed
wants to merge 7 commits into from

Conversation

ast9501
Copy link

@ast9501 ast9501 commented Feb 19, 2024

Allow using private key to access repositories.

- Build-in (or mount) private key in envbuilder image for access repository
@matifali matifali requested review from kylecarbs and aaronlehmann and removed request for kylecarbs March 30, 2024 11:17
envbuilder.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
git.go Show resolved Hide resolved
envbuilder.go Outdated Show resolved Hide resolved
envbuilder.go Outdated Show resolved Hide resolved
envbuilder.go Outdated Show resolved Hide resolved
envbuilder.go Show resolved Hide resolved
envbuilder.go Outdated Show resolved Hide resolved
envbuilder.go Outdated Show resolved Hide resolved
envbuilder.go Show resolved Hide resolved
Copy link
Author

@ast9501 ast9501 left a comment

Choose a reason for hiding this comment

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

I have added some commits for fix/improve some problems according to comment message.

go.mod Outdated Show resolved Hide resolved
git.go Show resolved Hide resolved
envbuilder.go Show resolved Hide resolved
@@ -147,6 +148,41 @@ resource "docker_container" "dev" {
}
```

### PrivateKey-based authentication
* Prebuild private key in your envbuilder image
Copy link

@ggjulio ggjulio Jun 28, 2024

Choose a reason for hiding this comment

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

Isn't this dangerous if we use a cache registry ?
The layer containing the private key may end up in the registry, or am I missing something ?

Copy link
Author

Choose a reason for hiding this comment

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

My original assumption was that this image may be stored in a private registry, so I didn't take into consideration the potential issue of having a private key in the image layers.

@unValerio
Copy link

Is there any other way as of right now to clone a private repository?

@ast9501
Copy link
Author

ast9501 commented Sep 12, 2024

Is there any other way as of right now to clone a private repository?

Maybe you can reference to README doc, there are some guides to access to different kind of git (also for private repository):
https://github.com/coder/envbuilder?tab=readme-ov-file#git-authentication

@ast9501 ast9501 closed this Sep 12, 2024
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

Successfully merging this pull request may close these issues.

4 participants