Comments (11)
I never said what you were trying to do would actually work. I have never even considered moving my ~/.ssh
folder as it is against well established convention.
I was just trying to tell you how to properly set env variables for various shells supported by Cmder.
You may have to make a copy of the script you mentioned and edit it to do what you need.
from cmder.
By asking Claude 3 (AI) this are the steps.
- Go to Settings...
- Go to Startup -> Tasks
- In {bash::bash} (the one that I am using) I added in the commands
set HOME=%CMDER_ROOT%.ssh
set SSH_USER_HOME=%CMDER_ROOT%.ssh
I added a .ssh folder to the cmder root with the keys.
from cmder.
Yeah I would not do it that way.
Cmder has init scripts you can add that stuff to in your case it would be $CMDER_ROOT/config/user_profile.sh
Add:
export SSH_USER_HOME="$CMDER_ROOT/.ssh"
or whatever else you need to configure in your env.
You could also look at $CMDER_ROOT/config/profile.d
and just drop a *.sh|cmd|ps1
file to customize bash|cmd|or powershell sessions.
from cmder.
Yeah the AI made up a bad answer, LOL.
from cmder.
Yeah I would not do it that way.
Cmder has init scripts you can add that stuff to in your case it would be
$CMDER_ROOT/config/user_profile.sh
Add:
export SSH_USER_HOME="$CMDER_ROOT/.ssh"
or whatever else you need to configure in your env.
You could also look at
$CMDER_ROOT/config/profile.d
and just drop a*.sh|cmd|ps1
file to customize bash|cmd|or powershell sessions.
It does not recognise export as a command.
Yeah, I did not test it well and in fact, it does not work
from cmder.
If you edited $CMDER_ROOT/config/user_profile.sh
and are using bash::bash
then export
is indeed a valid command.
from cmder.
apparently i am using cmd::Cmder
from cmder.
For cmd::cmder
edit %CMDER_ROOT%/config/user_profile.cmd
and use set
instead of export
.
You can also do the same for PowerShell::PowerShell
by editing $env:CMDER_ROOT\config\user_profile.ps1
.
$env:SSH_USER_HOME = "$env:CMDER_ROOT\.ssh"
from cmder.
I tried that, and it does not give me an error message, but it wont add the keys. I checked start-ssh-agent.cmd
and SSH_USER_HOME
does not appear anywhere.
I can't find what to change in there to set the path.
from cmder.
Ok, I need this to work in orther to have a portable working git with ssh keys so I don't have to copy my keys everywhere.
from cmder.
Wouldn't using the ssh agent be useful here?
Other than that, maybe editing the ssh\ssh_config
file in the vendor\git-for-windows
and setting the IdentityFile
variables to be a custom path can help you, such as ${CMDER_ROOT}/config/.ssh/...
or something like that.
Doing a quick search it seems that %SSH_USER_HOME%
is not associated with what you want to do, other people suggest changing the whole %HOME%
variable to point to somewhere (like CMDER_ROOT\config) and putting your .ssh
folder there.
from cmder.
Related Issues (20)
- Question: is it possible to auto complete suggestion (grayed out suggestion) HOT 2
- does cmder come packaged with curl and php? HOT 10
- [Bug] Not able to attach to debugger in VS Code Terminal HOT 3
- [Bug] cmder gets stuck on git reflog HOT 9
- 运行总是提示:“此时不应有 D:\Program。” HOT 6
- Aliases not recognized + system can't find path specified HOT 14
- [Bug] problem with "home" and 'end" keys
- [Feature request] Allow terminal to accept and run commands before cmder is fully loaded HOT 5
- [Bug] Shortcuts not work in cmder, and alias names aren't coloured correctly. HOT 6
- Question: How to update curl version in Bash console? HOT 5
- Question: Alias with admin permission
- [Bug] wired color blocks when running a CLI program based on Python and prompt_toolkit in cmder HOT 6
- [Bug] Chinese compatibility problem after resolving Kconfig files HOT 2
- [Feature request] fzf integration
- [Feature request] Update Clink version chrisant996 / v1.6.8 HOT 7
- [Bug] Predefined task: as Admin
- [Bug] Midnight Commander and msys HOT 1
- [Bug] Cmder ceases to be compatible with program Admin by Request HOT 8
- [Bug] 'git --version' returned an improper version string HOT 5
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 cmder.