-
Notifications
You must be signed in to change notification settings - Fork 55
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
Use git binary for fetch to make ssh easier #492
Conversation
60d0531
to
e35cb40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During testing I noticed that the following message happens twice, on cloning and fetching
Failed to add the host to the list of known hosts (/.ssh/known_hosts).
But it's not really related to this PR changes.
I think ssh config just needs to be fixed to specify writable known_host
Use the regular git binary for fetch (and all operations that involve remote repos) to make automatically picking up SSH keys easier. Otherwise, it's required to set up ssh-agent in go-git for only the fetching remotes step. Signed-off-by: Angel Misevski <amisevsk@redhat.com>
e35cb40
to
d2f9a89
Compare
/test v7-devworkspaces-operator-e2e, v7-devworkspace-happy-path |
rebased against main branch to fix required PR checks |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, JPinkney, sleshchenko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?
Make changes necessary to make basic SSH support work in the project clone container (basically, just use
git
binary for all operations involving remote repos.Currently,
project-clone
expects ssh keys to be stored in/.ssh
, since no$HOME
directory is configured for that container. To ensure compatibility with other editors, we should refine how users/homedirs are defined to make sure the same secret can be used for all workspace containers.What issues does this PR fix or reference?
Closes #400
Is it tested? How?
Can be tested using the image
quay.io/amisevsk/project-clone:ssh
(changeRELATED_IMAGE_project_clone
on the controller deployment).To manually test usage with a private repo, create a new ssh key (without passkey) and upload the pubkey to GitHub. Then, create a k8s secret in your namespace:
Once this is done, you should be able to create DevWorkspaces that use private repos.
PR Checklist
/test v7-devworkspaces-operator-e2e, v7-devworkspace-happy-path
to trigger)v7-devworkspaces-operator-e2e
: DevWorkspace e2e testv7-devworkspace-happy-path
: DevWorkspace e2e test