Added ssh-agent from windows
This commit is contained in:
2
.bashrc
2
.bashrc
@@ -139,5 +139,7 @@ export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
|||||||
export PATH="$PATH:/home/wholteza/.local/bin"
|
export PATH="$PATH:/home/wholteza/.local/bin"
|
||||||
export PATH=$PATH:/home/wholteza/.local/bin
|
export PATH=$PATH:/home/wholteza/.local/bin
|
||||||
|
|
||||||
|
source ~/.config/relay-ssh-agent.sh
|
||||||
|
|
||||||
eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/theme.omp.json)"
|
eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/theme.omp.json)"
|
||||||
[[ -z "$TMUX" ]] && exec tmux
|
[[ -z "$TMUX" ]] && exec tmux
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
local nvm_bin = os.getenv 'NVM_BIN'
|
local nvm_bin = os.getenv 'NVM_BIN'
|
||||||
local vue_typescript_plugin_path = nvm_bin .. '/../lib/node_modules/@vue/typescript-plugin'
|
local vue_typescript_plugin_path = nvm_bin .. '/../lib/node_modules/@vue/typescript-plugin'
|
||||||
|
|
||||||
|
vim.loader.enable()
|
||||||
|
|
||||||
-- "<leader>sh" to [s]earch the [h]elp documentation.
|
-- "<leader>sh" to [s]earch the [h]elp documentation.
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
|
|||||||
11
.config/relay-ssh-agent.sh
Executable file
11
.config/relay-ssh-agent.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
|
||||||
|
rm -f $SSH_AUTH_SOCK
|
||||||
|
(setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Check if the socket already exists
|
||||||
|
ss -a | grep -q $SSH_AUTH_SOCK
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
# Start a new socat process
|
||||||
|
rm -f $SSH_AUTH_SOCK
|
||||||
|
(setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
|
||||||
|
fi
|
||||||
@@ -6,7 +6,12 @@ sudo apt install \
|
|||||||
unzip \
|
unzip \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
fzf \
|
fzf \
|
||||||
fd-find
|
fd-find \
|
||||||
|
wget \
|
||||||
|
golang-go \
|
||||||
|
socat \
|
||||||
|
-y
|
||||||
|
|
||||||
|
|
||||||
curl -s https://ohmyposh.dev/install.sh | bash -s
|
curl -s https://ohmyposh.dev/install.sh | bash -s
|
||||||
|
|
||||||
@@ -17,3 +22,16 @@ sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
|||||||
|
|
||||||
# Install nvm
|
# Install nvm
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
||||||
|
|
||||||
|
# Set up ssh-agent from windows
|
||||||
|
|
||||||
|
cd ~/.config
|
||||||
|
rm -rf npiperelay
|
||||||
|
git clone https://github.com/jstarks/npiperelay
|
||||||
|
go version
|
||||||
|
cd npiperelay
|
||||||
|
# Build the binary and store it in our Windows C: drive
|
||||||
|
go get -d github.com/jstarks/npiperelay
|
||||||
|
GOOS=windows go build -o /mnt/c/temp/npiperelay.exe github.com/jstarks/npiperelay
|
||||||
|
# Create a symlink to a directory in our PATH
|
||||||
|
sudo ln -s /mnt/c/temp/npiperelay.exe /usr/local/bin/npiperelay.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user