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 GitHub promotion unit test over SSH #47

Closed
makkes opened this issue Oct 24, 2022 · 6 comments
Closed

Add GitHub promotion unit test over SSH #47

makkes opened this issue Oct 24, 2022 · 6 comments
Labels

Comments

@makkes
Copy link
Member

makkes commented Oct 24, 2022

We need to test cloning and pushing over SSH for a Pipeline spec like this:

[...]
spec:
  promotion:
    pull-request:
      url: ssh://github.com/org/repo
[...]
@makkes makkes added promotion Bug or feature related to app promotion team/sunglow labels Oct 24, 2022
@sympatheticmoose
Copy link

@makkes can you confirm if this is required after the switch to go-git-providers?

@makkes
Copy link
Member Author

makkes commented Nov 7, 2022

This is actually independent of go-git-providers as this is exclusively about pure git operations for which we use github.com/fluxcd/pkg/git/gogit. So yes, it is still relevant.

@yitsushi yitsushi self-assigned this Dec 19, 2022
@yitsushi
Copy link
Contributor

This is blocked:

msg: "unsupported URL scheme, only HTTPS supported: ssh://git@127.0.0.1:34307/org/test.git",
err: <*errors.errorString | 0xc000216140>{
    s: "unsupported URL scheme, only HTTPS supported",
},

We use go-git-provider's ParseUserRepositoryURL function to in order to create the repo client. There is actually a unit test for exactly this case in the p-c repo. Since we only have a single URL field in the Pipeline CRD, the same URL is used for both the PR creation as well as the clone operation. Therefore, we only support HTTPS.
Adding support for SSH and potentially other clone protocols supported by source-controller would mean to add another URL field to the Pipeline CRD.

this one: #47 is blocked on ssh being added to the controller

Yes, this is an oversight.
SSH is not supported.

Source: Slack

@lasomethingsomething
Copy link

Closing as the issue is about testing something we don't support.

@makkes
Copy link
Member Author

makkes commented Aug 18, 2023

Since when do we not support SSH? It has always been supported since the inception of p-c.

@yitsushi
Copy link
Contributor

Since when do we not support SSH? It has always been supported since the inception of p-c.

We are still using github.com/fluxcd/go-git-providers/gitprovider, did they add SSH to that, that was the blocker previously.

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

No branches or pull requests

4 participants