Private Repo specific branch/commit access as dependency for another private repo

We have a private GitLab server deployed (let’s say: and in there I have 2 private projects say project_A ( and project_B (
Now project_A has a dependency on project_B (in package.json). I want project_B’s specific branch/commit to be added as a dependency in project_A and how can I do that? will it be different for the HTTPS server?

I tried this locally and failed:
in project_A’s package.json,
(where this commit is from different branch and my git console was trying to find this commit in master branch)
What should I do ? and thanks in advance for any help…! :heartbeat: