Reputation: 211
I'd like to include an Azure repo I have as a dependency in a new Azure project. I've tried to find a way to do it like this: npm install --save 'https://[email protected]/user/private-repo.git'
but haven't found anything specifically for Azure. The closest thing I found Azure-wise was Microsoft's 'Azure Artifacts' solution which I'd rather not use if I can avoid it. Does anyone know how/if I can do this? Thank you!
Upvotes: 0
Views: 1475
Reputation: 19391
In this similar case, an engineer provided a solution: You can consider to use SSH. First make sure that the repos you want to install has a package.json at root.
Then, generate a pair of public/private key with the command: vssh-keygen -t rsa
. After that, you can follow this doc: Use SSH key authentication to install them into your org.
Clone the repos with SSH, and this will make your client accept the fingerprint expressed by the server. Then, go repos page, get the SSH URI to cloning your repos and add it into the dependencies section of your package.json
file
"dependencies": {
"testproj": "git+ssh://[email protected]:v3/{org name}/{project name}/{repos name}"
}
Upvotes: 2