Failed to clone the git repo of lyx.
Hongyi Zhao
hongyi.zhao at gmail.com
Sun Jan 14 15:32:42 UTC 2024
On Sun, Jan 14, 2024 at 10:44 PM Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
>
> On Sun, Jan 14, 2024 at 9:31 PM Yu Jin <technikmagma at gmail.com> wrote:
> >
> > Am So., 14. Jan. 2024 um 03:52 Uhr schrieb Hongyi Zhao:
> >>
> >> On Sun, Jan 14, 2024 at 9:21 AM Scott Kostyshak wrote:
> >> >
> >> > On Sun, Jan 14, 2024 at 09:06:28AM +0800, Hongyi Zhao wrote:
> >> > > Hi,
> >> > >
> >> > > I'm trying to clone the git repo of lyx, but always fail, as shown below:
> >> > >
> >> > > werner at X10DAi:~$ git clone git at git.lyx.org:lyx
> >> > > Cloning into 'lyx'...
> >> > > kex_exchange_identification: Connection closed by remote host
> >> > > Connection closed by 127.0.0.1 port 18888
> >> > > fatal: Could not read from remote repository.
> >> >
> >> > I sometimes have problems as well to clone.
> >> >
> >> > One possibility would be to try the following:
> >> >
> >> > https://github.com/cburschka/lyx
> >> >
> >> > Note however that (1) it is unofficial and I don't know the owner of
> >> > that repository so you have to decide if you trust it; and (2) it is 10
> >> > months out of date.
> >>
> >> I want to clone the up-to-date git repo of lyx.
> >
> >
> > This worked fine for me
> >
> > :~$ git clone git://git.lyx.org/lyx.git
> > Cloning into 'lyx'...
> > remote: Counting objects: 503349, done.
> > remote: Compressing objects: 100% (91927/91927), done.
> > Receiving objects: 100% (503349/503349), 509.70 MiB | 8.43 MiB/s, done.
> > remote: Total 503349 (delta 423483), reused 488371 (delta 409559)
> > Resolving deltas: 100% (423483/423483), done.
>
> In my case, I wrapped the git command in a bash script which calls git
> via proxychains-ng. The issue seems to be caused by proxychains-ng,
> which seems to have some issues working with the git protocol. See
> here [1] for a detailed discussion.
To be frank, I still don't know how to let git clone via a proxy, say,
socks5://127.0.0.1:18888, when working with git:// protocol in this
case.
I've tried the following, but it doesn't seem to work:
$ cat git-proxy.sh
#!/bin/sh
#exec nc -x 127.0.0.1:18888 $1 $2
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
# Configuration. Common proxy ports are 3128, 8123, 8000.
_proxy=127.0.0.1
_proxyport=18888
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport
$ /bin/git -c 'core.gitProxy=./git-proxy.sh' clone git://git.lyx.org/lyx.git
Cloning into 'lyx'...
^C
> [1] https://github.com/rofl0r/proxychains-ng/issues/545
>
> > --
> > Eugene
>
> Regards,
> Zhao
>
> > --
> > lyx-users mailing list
> > lyx-users at lists.lyx.org
> > http://lists.lyx.org/mailman/listinfo/lyx-users
More information about the lyx-users
mailing list