Comments (3)
Might passing the following environment variable work?
GIT_SSH_COMMAND="ssh -i ~/.ssh/special_id_ed25519"
from nix.
How can I pass an environment variable to fetchGit command in general case?
Suppose this fetchGit
is called from my configuration.nix
from nix.
How can I pass an environment variable to fetchGit command in general case?
GIT_SSH_COMMAND
affects all fetchGit
invocations. For a fine grained solution it's best to use ssh_config
, so that your expression isn't more environment-specific than necessary. For example, that way you could switch to using a keyring to unlock your key, or some other fancy solution without making your expression incompatible. This is especially important if you collaborate with others on a config. Hardcoding a path in the expression would prevent that.
In my opinion, configuration managers could be more helpful with the bootstrapping process, or maybe you could have a special $[name}-boot
config for the first run? Both configs could import a module that defines your programs.ssh.extraConfig
.
Providing an extra parameter to fetchGit
is not my preferred solution because it adds complexity and competes with a more flexible option, but private repos are a real pain if something doesn't work well, so I'd consider a contribution that adds such a parameter nonetheless.
from nix.
Related Issues (20)
- flag to check `nix develop` is working
- Docs: add explanation of why `cacert` should also be upgraded when upgrading a multi-user installation of nix HOT 1
- Nix issue in fluid attack HOT 3
- Nix path doesn't add itself in zshrc HOT 1
- Refering to `channel:` in search path got significantly slower in nix 2.21+
- error: evaluation of cached failed attribute 'packages.x86_64-linux' unexpectedly succeeded HOT 1
- Error when trying to create core users with empty uid HOT 2
- Add attrpath notation equivalent to `elemAt`
- problems linking nix-2.2x on Fedora: undefined reference to `TLS init function for nix::unix::interruptCheck'
- nix-daemon no autostart: systemd nix-daemon.service file resides on unmounted /nix
- Make --log-format=internal-json externally accessible
- meson: `host_machine.system()` isn't our `SYSTEM`
- Alphabetize the glossary HOT 1
- copying '«unknown»/' to the store HOT 2
- Why does `nix-daemon.service` set `KillMode=process` HOT 7
- Missing documentation: `unsafeDiscardOutputDependency`
- Nix integer overflow is implemented by undefined behavior HOT 1
- Enable C++ Sanitizers for Nix HOT 3
- Reorganize the language reference HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.