nix-community / bundix

Generates a Nix expression for your Bundler-managed application. [maintainer=@manveru]
160 stars 54 forks source link

Fetching private gems via a private git repo #69

Open lavoiesl opened 4 years ago

lavoiesl commented 4 years ago

Similar to https://github.com/nix-community/bundix/issues/61, but when via a git repo, not a gems source.

The issue is that nix-prefetch-git does not honour the user's credentials and there isn't any way to tell bundix how to fetch those private repos.

See https://github.com/NixOS/nixpkgs/issues/71246 for (a lot) more details.

emptyflask commented 4 years ago

Is this only an issue on MacOS? I'm running into it on my laptop, but I didn't have this problem on my NixOS machine for the same project for some reason.

takeda commented 4 years ago

@emptyflask is it possible that you have sandboxing disabled?

emptyflask commented 4 years ago

My mistake, I'm seeing this under NixOS now... I'm actually not sure why I was able to install sidekiq-pro without problems before.

mwdomino commented 2 years ago

I'm trying to build shell.nix for a few work projects and am running into this same issue. Creating the baseline shell.nix from https://nixos.wiki/wiki/Packaging/Ruby lets me do a bundle install and happily installs the private gems, but bundix throws up an askpass prompt and an error after the failed auth. We use PATs for repo permissions so an askpass solution wouldn't work for my use case.

Is there any new info on how we may be able to work around this?

emptyflask commented 1 year ago

It's not a realistic solution for every case, but I've been doing this on my own projects:

gem 'foo', git: 'https://user:ghp_xxxxxxxxxxxxx@github.com/emptyflask/foo.git'