-
Notifications
You must be signed in to change notification settings - Fork 56
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 usage docs #5
Comments
Hi Gents, Some good usage docs would be great here. Particularly, I'm assuming:
You can imagine I'm here because this is not working as expected :)
|
My issue turned out to be that you can't use |
The local dev flow is pretty awesome with https:// URLs with no authentication. You simply create a local ~/.netrc file, and everything works great. This buys you several things.
Hope that helps! On Thu, May 1, 2014 at 6:58 PM, Ryan Daigle [email protected]
|
Hi @rwdaigle! Thanks for jumping in on this. |
Hi Tim,
Unfortunately, this is quite a departure from the normal local development flow. Especially since you can't just populate your .netrc with your normal GH username/password – you have to use a token. Same goes for just logging in when prompted on
That's the biggest hiccup to me in this workflow. Not only do you have to modify all your private repo git URLs (from I'd be curious to know if this has been your experience as well? And if so, does it being the Right Way:tm: to do things justify the difficulties? |
Hey Ryan, Awesome questions. Let me tackle them out of order.
Nope. You probably have something wrong with your regular Github password, or used the wrong URL or something. You might try: GIT_CURL_VERBOSE=1 git fetch What happens when
Actually, that's not true. It's precisely because the If I put this in my machine github.com login timshadel password <my-gh-pass>
So because this is just a way to supply usernames & passwords to git, you can use any of the typical ways to do that locally. I use the Why not stick to user/pass in .netrc? Now, the question becomes, Do I really want my password lying around in plain text? That's where the whole token piece comes in. Tokens are only used because they're easily revoked, and they can be used anywhere in Github's infrastructure that Basic auth can be used. That means even when you have no Username for 'https://github.com': <my-gh-TOKEN>
Password for 'https://<my-gh-TOKEN>@github.com': x-oauth-basic HTTPS is the default URL protocol for Github repos Authenticating to Github and storing the credentials for Notice that both in Github's docs and in their UI (clone URL), SSH is an afterthought. You have to go digging to find it. They've clearly shifted emphasis to So unlike you and I who have used Github since the beta, most newer folks will only see So, the main motivation for using
Hopefully by now it's obvious that you don't need to. You can, yes, but you don't need to do this for local work—only to use this buildpack.
Yeah, this is the one-time pain point. There's a day or so of But the amazing thing is that One More Thing If create a token using the curl command in the README, and then you want to play with Github's API, using curl and jq for example, then you'll want to make sure you've got two lines in your machine github.com login <my-gh-token> password x-oauth-basic
machine api.github.com login <my-gh-token> password x-oauth-basic Then you can use curl -n https://api.github.com/user/repos To get rid of the --netrc-optional |
This thread is amazing. @timshadel would you be interested in collaborating on a Heroku blog post or Dev Center article? |
Wow. Sure, I guess. Is it used widely enough that you get questions like this?? But sure. What's the best way to get in touch? |
We don't necessarily get direct questions about this, but users are always searching for new and elegant ways to access private dependencies in the build process. This Email me at [email protected] |
Tim, I believe I know why I was experiencing this anomaly:
I have Two-factor auth turned on. I suspect with that setting, you can't just use your normal user/pass in the |
👋 everyone Just stumbled upon this repo/issue almost two years later. :) |
I'm hoping to get this buildpack updated for compatibility with the Heroku successor to the
user-env-compile
labs feature.The README mentions using this buildpack to keep secrets out of
package.json
, but it's not clear to me how this works in practice. I did a little investigating and it doesn't appear thatnpm
uses.netrc
or environment variables when fetching dependencies.@timshadel, can you shed some light on this?
cc @friism
The text was updated successfully, but these errors were encountered: