-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Server lacks SSH keys #4620
Comments
/triage accepted In the meantime, we should only skip the tests if we're on CI, since they should pass locally. It's not ideal, but we do run the tests locally as part of the release process, so we would still at least catch any issues at that stage. |
Summarizing some offline conversation with @KnVerey Only ssh keys belonging to valid github users can clone from github, even for public repos. Deploy Key provides an alternative if one only need read-only access to a specific GitHub repo. The tests in It should be enough to do the following:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.DEPLOY_KEY }} Based on the docs, this should configure the [1] The docs didn't mention if the same private key can be used as the deploy key for multiple repos. I didn't test it out but it seems ok in theory. |
Thanks for the investigation! I think that plan makes sense. I've created a read-only deploy key and added it as a secret named |
@KnVerey we also discussed removing anna's repo from the tests since we only want to clone this repo. I took a look. It’s being used as an example of a repo that has |
@mightyguava What's the name of the test? I'm wondering if it would be sufficient to have a unit test for repospec with an empty path, rather than need a full repo for whatever code that the test is covering. |
There are a few of them, here's one kustomize/api/krusty/remoteload_test.go Lines 132 to 137 in 416eed9
annasong20 in that file.
|
@annasong20 @KnVerey can this be closed? |
Describe the bug
The server that runs the CI pipeline when users open a PR doesn't have ssh keys. We currently skip all ssh tests in remoteload_test.go because the server returns an error. Once the server has ssh keys, the server should produce the expected output for those tests.
Files that can reproduce the issue
remoteload_test.go contains ssh tests for which
skip: true
. If you delete this line and run these tests on the server, you will observe errors caused by the lack of ssh keys instead of the expected behavior.Expected output
An example ssh test case is TestRemoteResourceSsh/scp_shorthand. The expected output is:
Actual output
For the same example test cases as above, the actual output due to the lack of ssh keys is:
Kustomize version
Master branch, which is currently at commit 17b42a9.
Platform
Linux and MacOS
The text was updated successfully, but these errors were encountered: