Closed jasonkuhrt closed 10 years ago
I see that component-downloader
goes from here
https://github.com/component/downloader.js/blob/master/lib/fields.js#L56-L67
function* download(path) {
var url = encodeURI(remote.file(repo, ref, path)[0]);
var destination = join(folder, path);
debug('downloading "%s" to "%s"', url, destination);
var res = yield* remote.request(url);
if (res.statusCode !== 200) {
res.destroy();
throw new Error('Error downloading "' + remote.name + '//' + repo + '@' + ref + '". Got status code "' + res.statusCode + '"');
}
yield write(res, destination);
}
}
through to here ?
https://github.com/component/remotes.js/blob/master/lib/remotes/github.js#L153-L160
GitHub.prototype.file = function (repo, ref, path) {
if (typeof path === 'object') path = path.path;
var tail = repo + '/' + ref + '/' + path;
return [
'https://raw.githubusercontent.com/' + tail,
'https://raw.github.com/' + tail,
]
}
Clearly there is nothing here for authentication. I've tried putting in my .netrc
file:
machine raw.githubusercontent.com
login ***
password ***
Which has no affect seemingly.
It seems that github will only facilitate downloading of private files via api.github.com
. http://stackoverflow.com/questions/18126559/how-can-i-download-a-single-raw-file-from-a-private-github-repo-using-the-comman
oh god :( that's no bueno because that would require a LOT of API calls.
Oi. Major oi. @jonathanong every couple of days I think to myself, maybe the deps array should literally require the end user to put instead of a version number for release, the actual URL of the release :0)
yeah that's why i'm working on https://github.com/normalize/package-management. at this point, you might as well just put the full URL everywhere
just did a quick read of package-management. nice work.
nlz.io sounds very promising. Big thumbs up from me. All those json and rc files are really becoming a nuisance.
This seems to be working now, I don't know why.
I posted my question to https://github.com/component/guide/issues/14 but maybe it belongs here, after realizing that the issue is that remotes in
component.json
now checks against a list of knowncomponent
remotes hence the error "no remote found":So, how would private github repositories be installed now?