From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MDl1Aye37mAQbAEAgWs5BA (envelope-from ) for ; Wed, 14 Jul 2021 12:06:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yBLHOia37mCNegAAB5/wlQ (envelope-from ) for ; Wed, 14 Jul 2021 10:06:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31C1212116 for ; Wed, 14 Jul 2021 12:06:30 +0200 (CEST) Received: from localhost ([::1]:52666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3bmf-0003io-Bf for larch@yhetil.org; Wed, 14 Jul 2021 06:06:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3bmH-0003gV-3Y for guix-devel@gnu.org; Wed, 14 Jul 2021 06:06:05 -0400 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]:38622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3bmF-00077t-16 for guix-devel@gnu.org; Wed, 14 Jul 2021 06:06:04 -0400 Received: by mail-oi1-x232.google.com with SMTP id w194so1672938oie.5 for ; Wed, 14 Jul 2021 03:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vLWuZHG7lJZ+qgVaFs+gxy7Ukx+wwYXMxKHYPmqVHJs=; b=Mh9vR/GQjZb10kSxv5Vqld418INCDIzghPzYQWjN6ZHKYFHTdMF/FiwV/56lnNTQug O0oxWIB/TPk0Ef6eb2GPt0PwVc1w6L8svghw7iNf6Lt3v8Jr2NtAY50GoEOxYwvAKeqi zwdYMlUFotjSWmxdovwrk6nZTpNKjkx1LQhIvuysRn1WBRdsnQA3YvF36VFZSh96NLku 9eSFh1QJuAsKdcmz8B5HzXFYtcPKnF0XUGOboV+G96mK4a2B07/1OQiH1cqPYONx/DBd n35pQaInhyLv14e8TjUff9Ixifdy0BFJRX12VnB12EUyd8e4DnC29sDCxuECuATmljy8 RoSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vLWuZHG7lJZ+qgVaFs+gxy7Ukx+wwYXMxKHYPmqVHJs=; b=c9UgmSraqe338aT2/6nB2t5YwUq1Nflj+VDHzY7xmNKVNyI1BpNoIQsyt9SdTlej1t pByBoRLXB9QJO5f8eri6XLKywbuAjIJszgdqhDhLNIxFTEzk54F0G8X/L+4ct2civgqW hTi60NNsR0IHhc7cUqABaT+j1gGS+b3in4r6tBLU7NEpO4yypemidkUIOK4otsWdAXyF BENwWrSgVd1ohYOIrc+NUnHYmcuW1UbGetdkD1r/W5cYFTJWkE8HeF4eUJ3SSAToXjS3 V2RNGcdLrpzfCaGVCPL24BMXozhAjkko6HbqDH7Mu72F5csq5uELhOXWAL9CgII8HUnG ZdiA== X-Gm-Message-State: AOAM5319+VkB5WKbHOGYLl/5Ku4qykVGlLaJmEGFycbln9YVRS0lXXqL 9KKv+jJyybjO3wG9LFV7RUxeI7/DdwIO8mYCXbj0XTB2 X-Google-Smtp-Source: ABdhPJy6GB1WlDXHCqSKw3G89VHLvV2oRoNHFBFXSwFLqUmgfg/lpZPqC8jEqAyK89z3oQPbCTU8R5Q77T7eo14CUWk= X-Received: by 2002:aca:3e09:: with SMTP id l9mr2244262oia.169.1626257161725; Wed, 14 Jul 2021 03:06:01 -0700 (PDT) MIME-Version: 1.0 References: <55ec7cec6de1b4f9f3336a342df598427949970e.camel@student.tugraz.at> In-Reply-To: <55ec7cec6de1b4f9f3336a342df598427949970e.camel@student.tugraz.at> From: Lo Peter Date: Wed, 14 Jul 2021 18:05:50 +0800 Message-ID: Subject: Re: SSH in git-fetch To: Leo Prikler Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=peterloleungyau@gmail.com; helo=mail-oi1-x232.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_BTC_ID=0.498, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626257190; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vLWuZHG7lJZ+qgVaFs+gxy7Ukx+wwYXMxKHYPmqVHJs=; b=bnaJi6Rpez8TtctW1+OqEdyWf8NZd5cfWtz8NZ+FtQ8zQYU3MojZgn1g+5jFc3MVn4L65A dlVPpea6PHd7mQR4IZ0Da80Y9R+TDPMOwZ3e28sjjdK2ZGE7M3Z2tU/Q2WEutFAo49sQCu UIfvRXLGGW7SnvgUWwJRSaFHRYr9HNWWigvioQ8NiVJxFtZ5qcfgA0cDpzHMxldWs0wXFl Ym0d8L5FkOS5Rn7y9e6oMGoAgbsK75ttjua4syV7jz8Kh+DCZrzeU7pON/JQjjX+Vv+Qdu dyhjbDMvKxaAM+psJA1jUG2iegAibi2uhfqzi+2tnvSakOqXyH2MU0xF4x1wfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626257190; a=rsa-sha256; cv=none; b=piChRNFjxAI3tzdSLu+NQJpdVNrvqyLYTIYDFyZ50+Jq5EYZmZlIt5jN0oQhxn+OWBHjmw ilsGC/wwpLziGQQKtYUncjKETYC9v0IGvzGFTiMamixpxHQVcO+jmdZ2k1MhgQVqLctwC+ 9pkNgGiCyh/ZbKdWqpRtU+QelOCFFHdJKZirC6GRayFReKKauP4F7+Y7WirYnBNTA29BJ+ E/5w8pNHfbN3DhF+s0/0rSztwkwPAXfWZTy8LsV6xE7zvZ1mbM+HWvYwjQKXpRVcyV7AiP J9N3NDBnX7ihIDxHsyb1rXLx0gKM+SWINNHqZS41Cj3CR11HYf7N3dEIt72x1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Mh9vR/GQ"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Mh9vR/GQ"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 31C1212116 X-Spam-Score: -3.10 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2NAKd21ClVfd Dear Leo, Thanks for the clarification. While I think your suggested workaround would probably work ok, I think that would offset much of the benefits of Guix. My intended use case is to use guix environment together with guix time-machine for per-project dependency management, so each project needs only two files (channels file and manifest file) committed to source control, to reproduce the same set of packages in different machines (we use multiple Jenkins instances). The private channel is only for a few internal packages that we cannot share to the world (I have no power to change this). It would be better that we need not manually ensure that each machine has the package source updated. I do hope Guix developers would reconsider supporting fetching over SSH for git-fetch. Meanwhile I will use the method suggested by Luis Felipe which I have tried and can confirm that it works. Regards, Peter Lo On Wed, Jul 14, 2021 at 5:47 AM Leo Prikler wrote: > > Hello Peter, > > Am Dienstag, den 13.07.2021, 22:38 +0800 schrieb Lo Peter: > > Dear all, > > > > I am experimenting with writing a package definition for an example R > > package (https://github.com/jennybc/foofactors) in a PRIVATE channel, > > where the R source is also at a PRIVATE github repository. > > While the private channel works with proper setup of SSH key (that > > needs to be in PEM format due to a bug in libssh2), I am having > > trouble with the private git repository for package source. > > > > Is it that git-fetch does not support fetching over SSH? > Indeed, git-fetch does not support fetching over SSH. > > > The package definition I have is: > > > > (define-module (my-packages r-pkgs) > > #:use-module ((guix licenses) #:prefix license:) > > #:use-module (guix packages) > > #:use-module (guix download) > > #:use-module (guix git-download) > > #:use-module (guix utils) > > #:use-module (guix build-system r) > > #:use-module (gnu packages) > > #:use-module (gnu packages statistics)) > > > > (define-public r-foofactors > > (let ((commit "ef71e8d2e82fa80e0cfc249fd42f50c01924326d") > > (revision "1")) > > (package > > (name "r-foofactors") > > (version (git-version "0.0.0.9000" revision commit)) > > (source > > (origin > > (method git-fetch) > > (uri (git-reference > > (url "git@github.com:peterloleungyau/foofactors.git") > > (commit commit))) > > (file-name (git-file-name name version)) > > (sha256 > > (base32 > > "1hmfwac2zdl8x6r21yy5b257c4891106ana4j81hfn6rd0rl9f72")))) > > (build-system r-build-system) > > (propagated-inputs > > `(("r-forcats" ,r-forcats))) > > (home-page "https://github.com/jennybc/foofactors") > > (synopsis "A R package to make factors less aggravating.") > > (description > > "Factors have driven people to extreme measures, like ordering > > custom conference ribbons and laptop stickers to express how HELLNO > > we > > feel about stringsAsFactors. And yet, sometimes you need them. Can > > they > > be made less maddening? Let's find out.") > > (license license:expat)))) > > > > > > Note that I have cloned the original public repository to my private > > repository (for testing purpose). I have added the package definition > > to my local ~/to_keep/projects/my-guix-pkgs/my-packages/r-pkgs.scm > > > > Then I test building it locally with > > > > $ guix build -L ~/to_keep/projects/my-guix-pkgs/ r-foofactors > > The following derivations will be built: > > /gnu/store/gnzw26jl9vw3z10cdnpcahd67zlf1ziy-r-foofactors- > > 0.0.0.9000-1.ef71e8d.drv > > /gnu/store/2l35rb0s5fjk1v8vczir6cp6lfmbbf12-r-foofactors- > > 0.0.0.9000-1.ef71e8d-checkout.drv > > building /gnu/store/2l35rb0s5fjk1v8vczir6cp6lfmbbf12-r-foofactors- > > 0.0.0.9000-1.ef71e8d-checkout.drv... > > guile: warning: failed to install locale > > environment variable `PATH' set to > > `/gnu/store/378zjf2kgajcfd7mfr98jn5xyc5wa3qv-gzip- > > 1.10/bin:/gnu/store/sf3rbvb6iqcphgm1afbplcs72hsywg25-tar-1.32/bin' > > hint: Using 'master' as the name for the initial branch. This default > > branch name > > hint: is subject to change. To configure the initial branch name to > > use in all > > hint: of your new repositories, which will suppress this warning, > > call: > > hint: > > hint: git config --global init.defaultBranch > > hint: > > hint: Names commonly chosen instead of 'master' are 'main', 'trunk' > > and > > hint: 'development'. The just-created branch can be renamed via this > > command: > > hint: > > hint: git branch -m > > Initialized empty Git repository in > > /gnu/store/7i9py1b47lsg2d2wqjk68ha04rv2l89i-r-foofactors-0.0.0.9000- > > 1.ef71e8d-checkout/.git/ > > error: cannot run ssh: No such file or directory > > fatal: unable to fork > > Failed to do a shallow fetch; retrying a full fetch... > > error: cannot run ssh: No such file or directory > > fatal: unable to fork > > git-fetch: '/gnu/store/ra24wp6glfzmpx1w6i3471aqcqqdrk96-git-minimal- > > 2.32.0/bin/git > > fetch origin' failed with exit code 128 > > Trying content-addressed mirror at berlin.guix.gnu.org... > > Trying content-addressed mirror at berlin.guix.gnu.org... > > Trying to download from Software Heritage... > > builder for `/gnu/store/2l35rb0s5fjk1v8vczir6cp6lfmbbf12-r- > > foofactors-0.0.0.9000-1.ef71e8d-checkout.drv' > > failed to produce output path `/gnu/store/7i9py1b47lsg2d2wqjk68ha04r > > build of /gnu/store/2l35rb0s5fjk1v8vczir6cp6lfmbbf12-r-foofactors- > > 0.0.0.9000-1.ef71e8d-checkout.drv > > failed > > View build log at > > '/var/log/guix/drvs/2l/35rb0s5fjk1v8vczir6cp6lfmbbf12-r-foofactors- > > 0.0.0.9000-1.ef71e8d-checkout.drv.bz2'. > > cannot build derivation > > `/gnu/store/gnzw26jl9vw3z10cdnpcahd67zlf1ziy-r-foofactors-0.0.0.9000- > > 1.ef71e8d.drv': > > 1 dependencies couldn't be built > > guix build: error: build of > > `/gnu/store/gnzw26jl9vw3z10cdnpcahd67zlf1ziy-r-foofactors-0.0.0.9000- > > 1.ef71e8d.drv' > > failed > > > > > > Why is there an error of "cannot run ssh"? Is it that git-fetch does > > not support fetching over SSH? > Yes, git-fetch does not support fetching over SSH. "Cannot run ssh" is > the error returned because the ssh program is missing at fetch time, > but even if it existed, you'd get a different error, namely one of > lacking keys. You'd have to set up Guix to authenticate itself as you > for pulling the source and while that is in theory possible, there is a > potential security risk attached to most ways of solving it and no > clear path forward. > > Furthermore, such a feature, were it integrated in Guix, is likely only > to be used for nonfree software and thus located closely to such > software itself. > > > I would like to prompt the use of Guix for per-project management in > > my small team of data scientists, so we would need a private channel > > for a few internal R packages. The above problem is a real blocker. > > Any help is greatly appreciated. > I don't think this has to necessarily be a blocker. You can point git- > fetch to file:// URIs, so your channel could have file:///path/to/repo > and it'd work under the assumption that your scientists run git pull on > those repos frequently enough (you could automate that with a script, > perhaps even one written in Guile/a handwritten Guix extension). If > you have company/university intranet, you could also expose those > internal package over that on a well-known address, that's not > reachable from outside. > > Regards, > Leo >