[英]How do I add something to my PATH on the server side when using VSCode Remote SSH?
I'm using Visual Studio Code's Remote SSH extension to develop code on my university's linux cluster, which still has an older version of git installed (1.8.3.1).我正在使用 Visual Studio Code 的远程 SSH 扩展在我大学的 linux 集群上开发代码,该集群仍然安装了旧版本的 git (1.8.3)。 This causes errors with the "GitLens" extension that I'm also using.
这会导致我也在使用的“GitLens”扩展出现错误。
I tried solving this problem by just cloning my own version of git into "~/git" and compiling it there for myself.我尝试通过将我自己的 git 版本克隆到“~/git”并在那里为自己编译来解决这个问题。 Then I added
然后我加了
export PATH=$HOME/git:$PATH
to my.zshrc file.到 my.zshrc 文件。
The problem is that vscode doesn't seem to care what I put in the.zshrc file.问题是 vscode 似乎并不关心我在 .zshrc 文件中放了什么。 Is there another way to set a custom git executable on the server side?
是否有另一种方法可以在服务器端设置自定义 git 可执行文件?
I also tried doing the same in the ".bashrc" file, just in case vscode uses bash for some reason.我也尝试在“.bashrc”文件中做同样的事情,以防vscode出于某种原因使用bash。 This also didn't work.
这也没有奏效。
The commands at the remote end of an SSH tunnel are executed using non-interactive shell so I think ~/.zshrc
is not executed. SSH 隧道远程端的命令是使用非交互式 shell 执行的,所以我认为
~/.zshrc
.zshrc 没有执行。 Use ~/.zshenv
or ~/.zprofile
.使用
~/.zshenv
或~/.zprofile
。 See http://zsh.sourceforge.net/Doc/Release/Files.html .请参阅http://zsh.sourceforge.net/Doc/Release/Files.html 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.