Iceberg: SCP urls are not limited to 'git@'
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, git@host.site 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 'gogs@our.site:org/towergame.git' type of remote URLs, but Iceberg code has 'git@' hardcoded. How to overcome this? Herby
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, git@host.site 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 'gogs@our.site:org/towergame.git' type of remote URLs, but Iceberg code has 'git@' hardcoded.
How to overcome this?
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, git@host.site 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 'gogs@our.site: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
participants (1)
-
Herby VojÄÃk