tramp-devel
[Top][All Lists]
Advanced

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

Re: Tramp and magit


From: S Neaves
Subject: Re: Tramp and magit
Date: Wed, 15 Aug 2018 09:21:25 +0100

Thanks Michael. FYI I think I managed to get it to work earlier this morning with:

(add-to-list 'tramp-remote-path "/path/to/git/on/remote/machine")
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)


On Wed, Aug 15, 2018 at 9:14 AM, Michael Albinus <address@hidden> wrote:
S Neaves <address@hidden> writes:

> Hello List,

Hi Sam,

> i.e. I can not get magit to work on my server accessed with tramp
> correctly.
>
> (require 'tramp)
> (push "/cm/shared/tools/git-2.18.0/bin/git" tramp-remote-path)
>
> to my .emacs
>
> and deleting my tramp file in .emacs.d
>
> If I use dired over tramp to get to a remote folder and then run:
>
> M-! which git
> which: no git in
> (/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/local/bin)

Maybe you should flush Tramp caches explicitly. Execute "M-x
tramp-cleanup-all-connections" and try then "M-! which git". Another
command to check is "M-! echo $PATH".

> So these commands are not finding git, but if I M-x shell on the
> server and run git it works fine.

I suspect that the directory, where git is located, is added to the
$PATH environment in your remote ~/.profile. In this case, I recommend
to to use

(push 'tramp-own-remote-path tramp-remote-path)

> Many thanks,
>
> Sam

Best regards, Michael.


reply via email to

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