Iceberg URL regex not matching how I would expect it to?
Hi All, I am having trouble setting up iceberg to access my repository via ssh. On the command line I assess it via: git clone user@server.com:/proj/proj.git and all works as expected. When adding trying to add the same repository to iceberg I get a parseUrl error thrown from class IceScpRemote. While debugging I see the following regex: matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?([\w\-]+)/([\w\-]+)(\.git)?' asRegex. which parses username@server.com:/directory/proj.git. However fails to parse: username@server.com:/dir1/dir2/proj.git The corrected version is as follows: matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?(([\w\-]+)/)+([\w\-]+)(\.git)?' asRegex. Questions: Is this by design? of the top of your head: If I use the corrected version am I going to run into other issues? NB: I am using 64 bit Pharo 6.0 Update: #60520 Thanks in advance,
user@server.com:/proj/proj.git Isn't it: git@server.com:user/project.git ? On Dec 24, 2017 15:36, "Ian Ian" <icjohnsoia@gmail.com> wrote:
Hi All,
I am having trouble setting up iceberg to access my repository via ssh.
On the command line I assess it via: git clone user@server.com:/proj/proj.git and all works as expected.
When adding trying to add the same repository to iceberg I get a parseUrl error thrown from class IceScpRemote. While debugging I see the following regex:
matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?([\w\-]+)/([\w\-]+)(\.git)?' asRegex.
which parses username@server.com:/directory/proj.git.
However fails to parse: username@server.com:/dir1/dir2/proj.git
The corrected version is as follows:
matcher := '(ssh\://)?([\w\-]+@)?([\w\-.]+)(\:[\d]+)?(\:|/)/?(([\w\-]+)/)+([\w\-]+)(\.git)?' asRegex.
Questions:
Is this by design? of the top of your head: If I use the corrected version am I going to run into other issues?
NB: I am using 64 bit Pharo 6.0 Update: #60520
Thanks in advance,
participants (2)
-
Ian Ian -
Julián Maestri