1

I'm trying to npm install a private package from my companies git repository.

I have access to this repository and can successfully clone the repository using

git clone [email protected]:Company/path-to-repo.git

when I run npm install, it tries to use

git clone ssh://[email protected]:Company/path-to-repo.git

which is when I get this error back:

Please make sure you have the correct access rights and the repository exists.

I also get the same error if I manually type git clone ssh://[email protected]:Company/path-to-repo.git in my terminal.

Also, I have succesfully set up ssh keys for my github account and this machine, running ssh -T [email protected] returns successful.

1 Answer 1

1

This is an explanation for why the clone isn't working, but because I don't know npm this does not include a suggestion for for fixing it.

The : after the user@host component makes this an invalid URL:

git clone ssh://[email protected]:Company/path-to-repo.git

Like any other URL, the format of the network location is [user@]host[:port], and :Company looks nothing like a valid port specification.

For that to work, it needs to be:

git clone ssh://[email protected]/Company/path-to-repo.git
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.