tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with tramp and magit


From: Michael Albinus
Subject: Re: Problem with tramp and magit
Date: Fri, 22 Jun 2018 09:55:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stephan Lindner <address@hidden> writes:

> Hi there,

Hi Stephan,

> I cannot use magit when accessing a project on my server via tramp.  I
> think this is a question that was asked before
> (https://emacs.stackexchange.com/questions/35055/magit-with-tramp-is-not-working-with-git-correctly)
> but I could not
> find a solution.
>
> Here is the warning message:
>
> |  Error (magit): Magit requires Git >= 1.9.4, but on
> | /ssh:address@hidden: the version is 1.8.3.
> |  
> |  If multiple Git versions are installed on the host then the
> |  problem might be that TRAMP uses the wrong executable.
> |  
> |  First check the value of `magit-git-executable'.  Its value is
> |  used when running git locally as well as when running it on a
> |  remote host.  The default value is "git", except on Windows
> |  where an absolute path is used for performance reasons.
> |  
> |  If the value already is just "git" but TRAMP never-the-less
> |  doesn't use the correct executable, then consult the info node
> |  `(tramp)Remote programs'.
>
> I checked in with an admin person who told me that there are different
> versions of git on the server.  So I created a
> symlink in my home bin director (/home/users/lindners/bin) to a
> different git version.
>
> |  address@hidden bin]$ ls -lh        
> |  lrwxrwxrwx. 1 lindners HPCUsers 33 May 29 15:00 git ->
> | /opt/rh/rh-git29/root/usr/bin/git
>
> And when I check the version I get this:
>
> |  address@hidden bin]$ git --version
> |  git version 2.9.3
>
>
> I further added the path to tramp-remote-path:
>
> |  (add-to-list 'tramp-remote-path "/home/users/lindners/bin")
>
> But the problem still persists.  If there a solution to this issue?

Well, I'm not a magit user, so I cannot debug magit itself. But you
might check first, which git version you're using via Tramp. First check
the command to be called:

C-h v magit-git-executable

The result shall be "git". Next, open a remote buffer, say dired in
"/ssh:address@hidden:", and apply the following shell
commands:

M-! which git
M-! git --version

I suppose that magit uses both synchronous and asynchronous processes,
so you shall check the results for asynchronous shell commands as well:

M-& which git
M-& git --version

> Thanks so much!  I am using tramp daily and it is great! 
>
> Best,
>
>       Stephan

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]