npm allows you to fetch node_modules directly from a github private repo.
"dependencies": {
"express": "4.14.0",
"privatepackage": "git+https://github.com/myaccount/privatepackage.git"
}
Is there a way in builder to access either github or if I mirror the repo at google.
"privatepackage": "https://source.developers.google.com/p/$PROJECT_ID/r/privatepackage"
How would I pass credentials?
I have a "hack" not what I would call a "solution" to this problem. It involves,
It's not elegant.
Hey!
We don’t have an integrated solution as of today, but here are a few solutions coming from users:
package.json:"my-private-module": "git+https://<github_token>:[email protected]/<user>/<repo>.git"
I hope this helps.
Thanks, @Philmod, the only problem with that approach, is that if you don't commit the url including the github token to GitHub, you will have to do some kind of "sed" like replacement in package.json. You would have to do it both on the developer side and the builder side, or .gitignore package.json and copy package.json.builder to package.json, all of which is messy. I think i'll need to do the same thing that i did with kubectl bring the git auth in from GCS and configure git. Like it is on my dev box.
This newly-published doc on Using Encrypted Files in your build should be helpful.
Wow, thanks @bendory, that is simple and effective. Way better than storing the account.json file in gs//.
Great! So glad you like it!
Shall we close this issue?
I'm closing this issue with the assumption that our doc on Using Encrypted Files resolves this issue. Please re-open if that does not provide you with what you need.
Most helpful comment
This newly-published doc on Using Encrypted Files in your build should be helpful.