unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Lo Peter <peterloleungyau@gmail.com>
To: help-guix <help-guix@gnu.org>
Subject: Fwd: SSH in git-fetch
Date: Wed, 14 Jul 2021 00:07:18 +0800	[thread overview]
Message-ID: <CAEM+zmgSqqshHiWc9NznuAMWHAN4NAAg==RECWcg9NxVhrj0yQ@mail.gmail.com> (raw)
In-Reply-To: <CAEM+zmjXVqARy5uPS=Hydp49-pXDUJ1dwgF-B5SLcb13=soz3g@mail.gmail.com>

---------- Forwarded message ---------
From: Lo Peter <peterloleungyau@gmail.com>
Date: Tue, Jul 13, 2021 at 10:38 PM
Subject: SSH in git-fetch
To: <guix-devel@gnu.org>


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?

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 <name>
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 <name>
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?

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.

Regards,
Peter Lo


       reply	other threads:[~2021-07-13 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEM+zmjXVqARy5uPS=Hydp49-pXDUJ1dwgF-B5SLcb13=soz3g@mail.gmail.com>
2021-07-13 16:07 ` Lo Peter [this message]
2021-07-14  9:18   ` Fwd: SSH in git-fetch Chris Marusich
2021-07-14 10:12     ` Lo Peter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEM+zmgSqqshHiWc9NznuAMWHAN4NAAg==RECWcg9NxVhrj0yQ@mail.gmail.com' \
    --to=peterloleungyau@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).