From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-199434-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 44BF5158094
	for <garchives@archives.gentoo.org>; Mon, 15 Aug 2022 09:05:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 081F6E0F94;
	Mon, 15 Aug 2022 09:05:01 +0000 (UTC)
Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6CF4BE0ADD
	for <gentoo-user@lists.gentoo.org>; Mon, 15 Aug 2022 09:05:00 +0000 (UTC)
Received: from list by ciao.gmane.io with local (Exim 4.92)
	(envelope-from <lnx-gentoo-user@m.gmane-mx.org>)
	id 1oNW1r-0006ke-6M
	for gentoo-user@lists.gentoo.org; Mon, 15 Aug 2022 11:04:59 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: gentoo-user@lists.gentoo.org
From: <nunojsilva@ist.utl.pt> (Nuno Silva)
Subject: [gentoo-user] Re: Layman adding git over ssh only repository
Date: Mon, 15 Aug 2022 10:04:51 +0100
Message-ID: <tdd27k$a53$1@ciao.gmane.io>
References: <9529065.VV5PYv0bhD@zeus>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
X-Archives-Salt: c435529c-3d6a-44d5-901f-c9c6ca9fcbaf
X-Archives-Hash: 0732dc663550ca3e71b78cef820e34cf

On 2022-08-15, Alexander Puchmayr wrote:

> Hi there,
>
> I tried to add a repository which is only reachable via git over ssh; no 
> access via git port (9418 according to /etc/services) or http(s). Only ssh 
> connections with public key are accepted.
>
> I tried 
> Layman -o ssh://git@myserver/path/to/repo.git -f -a myrepo, but failed with 
> "invalid url".
> Then I tried the same with "git://git@..." , also failed.
>
> It seems like it does not accept the url scheme and refusing to connect at 
> all. Next thing I tried is to create a repository.xml and put it to the local 
> file system:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE repositories SYSTEM "/dtd/repositories.dtd">
> <repositories xmlns="" version="1.0">
>   <repo quality="experimental" status="unofficial">
>     <name>my-repo</name>
>     <description lang="en">My overlay</description>
>     <owner type="person">
>       <email>alexander.puchmayr#my-email.com</email>
>       <name>Alexander Puchmayr></name>
>     </owner>
>   </repo>
>     <source type="git">git://myserver/path/to/repo.git</source>
> </repositories>
>
> Layman -o repository.xml -f -a myrepo now tries to fetch it via the git port 
> (9418), failing with timeout.
>
> Replacing source type="git" with "ssh", "ssh+git", "git+ssh" also did not 
> succeed. 
>
> I'm pretty sure not being the first one trying this, but I cannot find any 
> useful information how to do this. So how can I achieve this?

This is not something I have tried myself, but a quick glance at the
online manual page for layman shows a git+ssh example (under "Overlay
lists format") - the source type is still "git", "git+ssh" is only in
the protocol/scheme part of the URL, so perhaps it needs to be something
like:

    <source type="git">git+ssh://myserver/path/to/repo.git</source>

-- 
(Apologies if this is not helpful,)
Nuno Silva