In my manifest.json I have a custom dependency from a private GitHub repo and it works just fine in my Unity studio. The package can be resolved and integrated into my Unity project:
{
“dependencies”: {
“my-cool-sdk”: “git@github.com:myname/my-cool-sdk.git”,
…
}
}
Now I want to add versioning, and start to tag my code with tags, e.g. “0.1”. In accordance with the Unity Docs here and here I can specify the tag name at the end of the package path with hash and it should pull instead of the latest, that specific tag:
“my-cool-sdk”: “git@github.com:myname/my-cool-sdk.git#0.1”,
As soon as I change the config, Unity studio is unable to resolve the package with the following error:
An error occurred: Version … is invalid. Expected one of: a ‘SemVer’ compatible value; a value starting with ‘file:’; a Git URL starting with ‘git:’ or ‘git+’, or ending with ‘.git’
I tried to hack a little and add ssh:// as recommended in docs:
“my-cool-sdk”: “ssh://git@github.com:myname/my-cool-sdk.git#0.1”,
and got the following error (it’s a private repo):
Couldn’t read from remote repository
My Unity version is 2021.2.0f1
How can I reference a particular tag in a private GitHub repo accessible over SSH?