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

Authentication issue::Unable to clone a directory/package from a private repo #3934

Open
Cbkhare opened this issue Apr 27, 2023 · 1 comment
Assignees
Labels
area/porch bug Something isn't working triaged Issue has been triaged by adding an `area/` label

Comments

@Cbkhare
Copy link

Cbkhare commented Apr 27, 2023

I am trying to clone a directory/package from a private git repo which has been registered. While executing the clone command, I am getting the below authentication issue.

$   kpt alpha rpkg clone \
>   https://github.com/******/***********.git pkg-out \
>   --directory=/test-pkg-out \
>   --ref=main \
>   --repository=test-catalogue \
>   --namespace=test
Error: Internal error occurred: cannot clone Git repository: cannot fetch repository /: authentication required

Repo registration details

$ kpt alpha repo get  -A
NAME             TYPE   CONTENT   DEPLOYMENT   READY   ADDRESS
test-catalogue   git    Package   false        True    https://github.com/******/***********.git

Since it is a private repository, I have hidden some details above with *

Note:

  • kpt alpha rpkg init/push/propose is working correctly with the above repository. Hence, I doubt if the credentials are an issue.

Expected behaviour.

  • If I have passed the repository details to the clone command --repository=test-catalogue, then authentication should have been addressed by the secretRef in the Repository CR.
@Cbkhare Cbkhare added the bug Something isn't working label Apr 27, 2023
@yuwenma yuwenma added the triaged Issue has been triaged by adding an `area/` label label Apr 27, 2023
@mortent
Copy link
Contributor

mortent commented Apr 29, 2023

@Cbkhare Thanks for reporting this.

So Porch doesn't currently have support for doing git or oci-based clones from private repositories. We are open to contributions here, but it should probably start with a design proposal, as it is not obvious how it would work.

But if the repository you want to clone from is either a Porch repository, or has a structure that allows you to register it with Porch, you can do a clone where you reference the Kubernetes name of the PackageRevision rather than the git repository. This is the "package" option described in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/porch bug Something isn't working triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

No branches or pull requests

4 participants