HashLoad / boss

Dependency Manager for Delphi and Lazarus
https://t.me/hashload
MIT License
515 stars 95 forks source link

Can not clone Repository via SSH from gitlab #169

Open Basti-Fantasti opened 1 month ago

Basti-Fantasti commented 1 month ago

I have logged in to my own hosted gitlab and try to download / install a dependency in a boss test project

But when I try to add the repository in the format:

boss install git@mygitlab.domain.de:delphi/libraries/mylib.git

I get the following error:

[INFO ] Installing modules in project path
[INFO ] Building cache files...
[INFO ] Updating cache of dependency gtrlib
[INFO ] Downloading dependency git@mygitlab.domain.de:delphi/libraries/mylib
[ERROR]   Cloning into 'X:\git_local\bosstest\modules\mylib'...
[ERROR]   fatal: unable to access 'https://mygitlab.domain.de:delphi/libraries/mylib/': URL rejected: Port number was not a decimal number between 0 and 65535
[ERROR] exit status 128

Why does it try to map the given repository path to a https:// path? Is there another syntax on how to pass wht git@xxx/bla.git repository format?

Cloning the repositories manually on the command line using git directly works like a charm using ssh

Basti-Fantasti commented 1 month ago

I see that in the utils.go > EnsureDependencyOfArgs function the .git suffix is trimmed. But why is that? the dependendy as given above should be valid.

EDIT: and why is the https:// prefix enforced? For the repository structure as shown above this is not needed

Basti-Fantasti commented 1 month ago

I modified the original code to accept this kind of repository name. Therefore I've modified the core/installer/utils.go models/dep.go

I forked the repo and pushed the changes accordingly