Clone with SSH URLs? #885

Open
opened 2022-01-19 02:09:26 -06:00 by unity-emilk · 1 comment
unity-emilk commented 2022-01-19 02:09:26 -06:00 (Migrated from github.com)

Calling Clone with an SSH URL like:
repo, err := Clone("git@github.com:owner/repo.git", "/some/path", opts)

Returns an error from net/url like: parse \"git@github.com:owner/repo.git\": first path segment in URL cannot contain colon.

Is calling Clone with an SSH URL not supported?

go1.17.6.linux-amd6
libgit2 version 1.3
git2go v33.0.6

Calling [Clone](https://github.com/libgit2/git2go/blob/main/clone.go#L24) with an SSH URL like: `repo, err := Clone("git@github.com:owner/repo.git", "/some/path", opts)` Returns an error from net/url like: `parse \"git@github.com:owner/repo.git\": first path segment in URL cannot contain colon`. Is calling Clone with an SSH URL not supported? go1.17.6.linux-amd6 libgit2 version 1.3 git2go v33.0.6
unity-emilk commented 2022-01-20 02:25:17 -06:00 (Migrated from github.com)

Cloning with a ssh remote like ssh://git@github.com/owner/repo.git works.

Cloning with a ssh remote like `ssh://git@github.com/owner/repo.git` works.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#885
No description provided.