Using SSH URLs with repo

6,406 views
Skip to first unread message

Guillaume Parent

unread,
Jul 11, 2012, 1:16:24 PM7/11/12
to repo-d...@googlegroups.com
Hey,

I'm setting up a ROM's repo and since https has some issues, I figured using SSH fetch URLs might be the best idea.

My first try was this:

<remote  name="myrom"
           fetch="ssh://g...@github.com:myrom/"
           revision="jellybean" />
...
<project path="system/extras" name="platform_system_extras" remote="slimdroid" revision="jellybean" />

Which leads to this error (for every repo that is my own rather than stock):

Fetching projects:  99% (292/294)  ssh: Could not resolve hostname github.com:myrom: Name or service not known
fatal: The remote end hung up unexpectedly
error: Cannot fetch platform_system_extras

If I look at Cyanogenmod's manifest, I see that they have this:

<remote name="private"
           fetch="ssh://g...@github.com" />

However, since all my repos are part of a github organization, I find it redundant to add myrom_ to every repo name and make it work that way. Is there something I'm not understanding? What is the proper way to use ssh and repo?

Thanks,

Magnus Bäck

unread,
Jul 11, 2012, 1:20:52 PM7/11/12
to repo-d...@googlegroups.com
On Wednesday, July 11, 2012 at 13:16 EDT,
Guillaume Parent <gpa...@gmail.com> wrote:

> I'm setting up a ROM's repo and since https has some issues, I figured
> using SSH fetch URLs might be the best idea.
>
> My first try was this:
>
> <remote name="myrom"
> fetch="ssh://g...@github.com:myrom/"
> revision="jellybean" />

Use ssh://g...@github.com/myrom/ instead of ssh://g...@github.com:myrom/.

[...]

--
Magnus Bäck
ba...@google.com

Guillaume Parent

unread,
Jul 11, 2012, 1:22:25 PM7/11/12
to repo-d...@googlegroups.com
Okay, looking at the syntax of my URL, I understand that it is wrong and that I'm specifying a port. So I guess I know what I'm doing wrong, I'm just curious how to actually do what I want at this point.


On Wednesday, July 11, 2012 1:16:24 PM UTC-4, Guillaume Parent wrote:
Hey,

I'm setting up a ROM's repo and since https has some issues, I figured using SSH fetch URLs might be the best idea.

My first try was this:

<remote  name="myrom"
           fetch="ssh://g...@github.com:myrom/"
           revision="jellybean" />
...
<project path="system/extras" name="platform_system_extras" remote="slimdroid" revision="jellybean" />

Which leads to this error (for every repo that is my own rather than stock):

Fetching projects:  99% (292/294)  ssh: Could not resolve hostname github.com:myrom: Name or service not known
fatal: The remote end hung up unexpectedly
error: Cannot fetch platform_system_extras

If I look at Cyanogenmod's manifest, I see that they have this:

<remote name="private"
           fetch="ssh://git@github.com" />

Guillaume Parent

unread,
Jul 11, 2012, 2:35:43 PM7/11/12
to repo-d...@googlegroups.com
Worked perfectly, thanks. Is there a way make public key passphrases work when doing a repo sync, or should I open a bug report for that? I have a workaround meanwhile.

Thanks,


Magnus Bäck

unread,
Jul 11, 2012, 2:40:30 PM7/11/12
to repo-d...@googlegroups.com
On Wednesday, July 11, 2012 at 14:35 EDT,
Guillaume Parent <gpa...@gmail.com> wrote:

> Worked perfectly, thanks. Is there a way make public key passphrases
> work when doing a repo sync, or should I open a bug report for that?
> I have a workaround meanwhile.

Public key authentication should work just fine. What error do you get?
Does the equivalent "git clone" operation work? Does "repo --trace sync"
reveal anything interesting?

--
Magnus Bäck
ba...@google.com

Guillaume Parent

unread,
Jul 11, 2012, 3:15:00 PM7/11/12
to repo-d...@googlegroups.com
It prompts for my public key password which is impossible to type in afterwards. The problem is with the seemingly inaccessible password entry, not the actual syncing.


--
Magnus Bäck
ba...@google.com

Shawn Pearce

unread,
Jul 11, 2012, 3:16:44 PM7/11/12
to Guillaume Parent, repo-d...@googlegroups.com
Use an ssh-agent, add the key ahead of time with ssh-add.
Reply all
Reply to author
Forward
0 new messages