New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchgit/fetchFromGitHub fail to fetch submodules from "git@server:repo" URLs #28324

Closed
volth opened this Issue Aug 16, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@volth
Contributor

volth commented Aug 16, 2017

https://github.com/kryptco/kryptonite-android/blob/master/.gitmodules is

[submodule "libsodium-jni"]
	path = libsodium-jni
	url = git@github.com:kryptco/libsodium-jni
[submodule "zxing"]
	path = zxing
	url = https://github.com/zxing/zxing
[submodule "identicon"]
	path = identicon
	url = https://github.com/KryptCo/identicon
[submodule "ssh-wire"]
	path = ssh-wire
	url = git@github.com:kryptco/ssh-wire

so both fetchgit and fetchFromGitHub fail with Could not create directory '/var/empty/.ssh'

Steps to reproduce

  fetchFromGitHub {
    owner = "kryptco";
    repo = "kryptonite-android";
    rev = "2.2.3";
    fetchSubmodules = true;
    sha256 = "0000000000000000000000000000000000000000000000000000";
  }
  fetchgit {
    url = "https://github.com/kryptco/kryptonite-android";
    rev = "2.2.3";
    fetchSubmodules = true;
    sha256 = "0000000000000000000000000000000000000000000000000000";
  }

Related "#26695 fetchgit: support "git@server:repo" URLs "


UPD: Fail even without submodules:

  fetchgit {
    url = "git@github.com:kryptco/kryptonite-android";
    rev = "2.2.3";
    sha256 = "0000000000000000000000000000000000000000000000000000";
  }

@volth volth changed the title from fetchgit/fetchFromGitHub fail to fetch submudules from "git@server:repo" URLs to fetchgit/fetchFromGitHub fail to fetch submodules from "git@server:repo" URLs Aug 16, 2017

@disassembler

This comment has been minimized.

Member

disassembler commented Aug 22, 2017

Since your using user@github.com instead of a public repo url, you need to use fetchgitPrivate. See this blog post for usage: https://www.mpscholten.de/nixos/2016/07/07/private-github-repositories-and-nixos.html

@volth

This comment has been minimized.

Contributor

volth commented Aug 26, 2017

But it is not a private repo. Perhaps it was private some time ago and still has private-style links to submodules

@volth volth closed this Aug 26, 2017

@fgaz

This comment has been minimized.

Contributor

fgaz commented Mar 7, 2018

I can reproduce this. The repos are public but fetchgit fails

EDIT: this was a problem with the repository. It was configured to use ssh submodules from github, but github does not accept ssh connections from arbitrary keys even for public repositories. Switching the submodules to https fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment