-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Unable to load Git Graph' when running via Remote-SSH (with local 'git.path' set, but no remote 'git.path' set) #106
Comments
Glad to hear you were able to resolve the issue by fixing your path! |
@mhutchie Thanks for your reaction! Other addons using git (for example GitLens) and also vs code itself use git without a git.path being set. Also when developing on remote machines via the Remote-SSH addon by MS. Also Git-graph works locally without a git.path set. But for some reason when developing via SSH-remote the git-path on the remote machine must be set only for GitGraph to work, but doesn't need to be set for the other addons and vs code, because they work fine without it. Is there maybe a usersetting in GitGraph to use the default git installation on the remote so we don't need to set the git.path on each remote machines user settings.json we work on? |
If the “git.path” setting is not set, Git Graph defaults to use the Git installation on the remote machine (by checking the path environment variable). For the “Unable to load Git Graph” error to appear, it tried to use it, but it could not be found / executed for some reason on your remote machine. I’ve tested the extension on all types of Remote Development options, and it has worked for me without having to explicitly set the “git.path” variable. I suspect it is just some configuration difference on your specific remote machine. There are different ways of running Git commands from an extensions perspective, and even an integration provided through the VSCode API. The method Git Graph uses is common, although other extensions could definitely be using a different method that was not affected on your remote machine. |
@mhutchie Yes, there must be something different between invididual addons and vs code. I just did another test: When I remove the When using git directly on the virtual machine (with Ubuntu 19.04); inside a Linux terminal |
@mhutchie I see the problem now: When using Remote-SSH GitGraph still seems to be looking at the So it seems to me that GitGraph should never look for When I temporarely remove the So I think VS Code and GitLens are ignoring the local I cannot solve this on my end AFAIK because I need that Or am I missing something here? |
The Visual Studio Code API acts as an interface for extensions to read the global or workspace settings defined in You should be able to add "git.path" to the remote workspaces |
@mhutchie Alright, that makes sense. So if I get it right it's just not possible to leave out the So that means we should always define a I was hoping for something more general for different remote hosts, because most hosts use the default git locations and/or path variable anyway, so leaving out the path to get the default would be preferred. But I understand it just doesn't work like that now. So to make the remote path general (and OS independent) still, I just add this to the remotes than, which is still causing the default behaviour of using git from path variable and is working fine: Thanks again for your help @mhutchie . |
@mhutchie And now that I think of it, there's not even a need to set So I just don't use the Problem solved. |
[edit]
When using GitGraph via Remote-SSH and there's no
"git.path"
setting defined both locally and on remotesettings.json
files, GitGraph uses the default git-path or path-variable on the remote machine, so does exactly what we expect and finds git there.But when using GitGraph via Remote-SSH when there's no
"git.path"
setting defined on the remote, GitGraph seem to look for the local"git.path"
setting and uses that one instead. But that setting is meant to be used locally, so is a different path to git than the remote git path. Especially when using a different operating system on remote (like Linux) than locally (like Windows).When needing the local
"git.path"
variable for our local projects and also need the remote"git.path"
variable for remote-ssh sessions, we can override this problem by adding a"git.path"
variable to the remotesettings.json
so GitGraph can alway find git on that remote, but that shouldn't be nececary. And needs to be done for all remotes we are working on, even if we always use the default git installation on those machines.So it would be best in my opinion if GitGraph always ignores the local
"git.path"
setting when working in a Remote-SSH session.BTW Thanks for this great addon!
The text was updated successfully, but these errors were encountered: