aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-14 13:38:05 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-09-14 13:38:05 +0200
commitd72d31d5294586943ef9fb7d13706f629837bf21 (patch)
tree37af03f31b04671124df3739c54f4b6a4eabab34 /src/libfetchers
parente664270c2b8fd79ddfe0ab8c7f15a730728ed623 (diff)
github fetcher: Use git+https for cloning
git+ssh only works if you have SSH access.
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/github.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc
index 298c05f9a..06b56d60d 100644
--- a/src/libfetchers/github.cc
+++ b/src/libfetchers/github.cc
@@ -273,7 +273,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
void clone(const Input & input, const Path & destDir) override
{
auto host = maybeGetStrAttr(input.attrs, "host").value_or("github.com");
- Input::fromURL(fmt("git+ssh://git@%s/%s/%s.git",
+ Input::fromURL(fmt("git+https://%s/%s/%s.git",
host, getStrAttr(input.attrs, "owner"), getStrAttr(input.attrs, "repo")))
.applyOverrides(input.getRef().value_or("HEAD"), input.getRev())
.clone(destDir);
@@ -341,7 +341,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
{
auto host = maybeGetStrAttr(input.attrs, "host").value_or("gitlab.com");
// FIXME: get username somewhere
- Input::fromURL(fmt("git+ssh://git@%s/%s/%s.git",
+ Input::fromURL(fmt("git+https://git@%s/%s/%s.git",
host, getStrAttr(input.attrs, "owner"), getStrAttr(input.attrs, "repo")))
.applyOverrides(input.getRef().value_or("HEAD"), input.getRev())
.clone(destDir);