kulak
March 8, 2023, 3:38pm
1
I created a private repository I am trying to consume with dependency:
The proper GIT origin URL is in form git@gitlab.com:group/project.git
. When trying to add I run into 2 types of errors: fail to parse port (group is not a number) or invalid URL base.
I tried variations:
[dependencies]
projectName = { git = "ssh://git@gitlab.com:group/projectName.git " }
projectName = { git = "git@gitlab.com:group/projectName.git " }
jofas
March 8, 2023, 3:51pm
2
The git shorthand syntax for ssh URLs is not supported by Cargo. See the appendix of the Cargo book:
Note: Cargo does not support git's shorthand SSH URLs like git@example.com:user/repo.git
. Use a full SSH URL like ssh://git@example.com/user/repo.git
.
I believe replacing the :
with /
in front of your group should be working in your case:
[dependencies]
projectName = { git = "ssh://git@gitlab.com/group/projectName.git " }
1 Like
system
Closed
June 6, 2023, 5:12pm
4
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.