Iceberg: SCP urls are not limited to 'git@'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Iceberg: SCP urls are not limited to 'git@'

Herby Vojčík
Hello!

Once I finally added remote to my localgit repo, I cannot build my image
any more because Iceberg fails to parse the url. After first error I
tried ssh://, but it is protected as well.

The problem is, [hidden email] is just the way to say which user to log
in via ssh into the host. We use on-premise gogs installed via apt, and
it installs 'gogs' user, not 'git' user. As such, we were being able to
successfully use '[hidden email]:org/towergame.git' type of remote URLs,
but Iceberg code has 'git@' hardcoded.

How to overcome this?

Herby

Reply | Threaded
Open this post in threaded view
|

Re: Iceberg: SCP urls are not limited to 'git@'

Herby Vojčík
I put this hotfix in my script:

"Work around scp url hardwired 'git@'"
IceScpRemote class compile: 'canHandleUrl: aRepositoryUrl
        "Very simplistic implementation that does not cover all cases"
        ^ aRepositoryUrl matchesRegex: ''([\w.-]+@|ssh\://).*'''.
IceScpRemote compile: ((IceScpRemote >> #parseUrl) sourceCode
copyReplaceAll: 'git@' with: '[\w.-]+@').

Is it ok for Iceberg devs to make those (or similar) changes into
Iceberg code itself?

Herby

Herby Vojčík wrote:

> Hello!
>
> Once I finally added remote to my localgit repo, I cannot build my image
> any more because Iceberg fails to parse the url. After first error I
> tried ssh://, but it is protected as well.
>
> The problem is, [hidden email] is just the way to say which user to log
> in via ssh into the host. We use on-premise gogs installed via apt, and
> it installs 'gogs' user, not 'git' user. As such, we were being able to
> successfully use '[hidden email]:org/towergame.git' type of remote URLs,
> but Iceberg code has 'git@' hardcoded.
>
> How to overcome this?
>
> Herby
>


Reply | Threaded
Open this post in threaded view
|

Re: Iceberg: SCP urls are not limited to 'git@'

Herby Vojčík
In reply to this post by Herby Vojčík
Herby Vojčík wrote:

> Hello!
>
> Once I finally added remote to my localgit repo, I cannot build my image
> any more because Iceberg fails to parse the url. After first error I
> tried ssh://, but it is protected as well.
>
> The problem is, [hidden email] is just the way to say which user to log
> in via ssh into the host. We use on-premise gogs installed via apt, and
> it installs 'gogs' user, not 'git' user. As such, we were being able to
> successfully use '[hidden email]:org/towergame.git' type of remote URLs,
> but Iceberg code has 'git@' hardcoded.

That said, it probably needs deeper change in Iceberg. For example,
having one global setting (in Settings there is one) for ssh git user is
incorrect, as every scp/ssh repo url may have its own user

> How to overcome this?
>
> Herby