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

Support Private Github Repos #417

Closed
michaelhofrichter opened this issue Dec 10, 2021 · 6 comments · Fixed by #422
Closed

Support Private Github Repos #417

michaelhofrichter opened this issue Dec 10, 2021 · 6 comments · Fixed by #422
Assignees
Labels
priority A combination of urgency and impact

Comments

@michaelhofrichter
Copy link
Collaborator

If I'm pulling a private Github repo into the playground, it works if my url for the package includes my github personal access token per https://docassemble.org/docs/development.html#githubprivate. If I just write my private package link, Docassemble can still query the appropriate branches, but it can't install them.

@michaelhofrichter
Copy link
Collaborator Author

perhaps use the git@github.com: link instead -- that doesn't require the detail
GitHub packages have two "URLs." One is the one that begins with https://github.com. The other is the one that looks like git@github.com:jhpyle/docassemble-somepackage.git. You can find this "URL" using the "Code" button in GitHub when you are looking at a repository. You can use the latter format for cloning a private repo in the Playground "pull" interface.

@plocket
Copy link
Collaborator

plocket commented Dec 10, 2021

We'll need to handle this in the setup script in puppeteer-utils.js. We'll need to parse out the GitHub repo info and replace it with that prefix and the suffix. This should supposedly work for public repositories as well.

@plocket plocket self-assigned this Dec 10, 2021
@plocket plocket added the blocked There's a reason this work can't move forward right now label Dec 11, 2021
@plocket
Copy link
Collaborator

plocket commented Dec 12, 2021

Blocked by a docassemble bug that doesn't let you pull a private repo into an empty da Project. That's on the radar to be fixed, but we're not sure how long it will take. In the meantime there's this work around:

in the meantime you can get around it if you just create a "package" (doesn't matter what it's called or what it has in it), and then do the "pull."

I'm going to go ahead and do it because it's unclear when the patch will be out and we want people to be able to use this. It will slow down everyone's tests a fraction, but it's temporary.

@plocket
Copy link
Collaborator

plocket commented Dec 12, 2021

Note: for a private repo, a developer needs to integrate the testing account with a GitHub account that has permissions for that repository.

@plocket plocket removed the blocked There's a reason this work can't move forward right now label Dec 12, 2021
@plocket
Copy link
Collaborator

plocket commented Dec 12, 2021

Welp, the workaround we did is not necessary for updated docassemble servers:

https://docassemble.org/docs/changelog.html 1.3.9 - 2021-12-11

Fixed issue where GitHub SSH only worked during a Playground pull if there was an active package.

That said, not everyone is going to update to that for a while, so it may be worth keeping this temporary fix in place for now. Since one of our next steps will be to utilize the API for all this stuff, it may be worth just keeping this here and getting rid of it, along with other stuff, at v4.

@plocket
Copy link
Collaborator

plocket commented Dec 12, 2021

1.3.9 commit that I believe created this API is at jhpyle/docassemble@8b3ef3d#diff-4c8bf136c393acf44c18098d2b935b3a005636e57574530acffdf552432360faR18579. Should check how private repos are handled there.

plocket added a commit that referenced this issue Dec 15, 2021
Close #417, fix private repos don't get pulled into package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority A combination of urgency and impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants