I'm working on a project, where I have some public bower components, and I'm writing some of my own. But, I don't want to publish/register it on bower registry. I wan't to use my PRIVATE Bitbucket repository.
So, if i type in terminal: bower install my_package_name
I want to download that package from my private repo.
I get the idea, that I should specify the git repo in bower.json file, but what I'm struggling with is authentication through terminal.
When you create a Bitbucket Cloud repository, you specify whether it's private or public, but you can also change this setting at any time. If your repository is public, anyone can access and fork it. If your repository is private, you can specify who exactly can access your repository and whether they can fork it.
Click the gear icon and select Accounts. Click Add from the Accounts tab. After you select a Host, enter your hosting details. If you selected Bitbucket or GitHub, keep the default Auth Type and click Connect Account to enter your credentials.
Ok, since nobody answered, I figured it out by myself. You can use with HTTPS like this:
{ "dependencies" : { "my_package_name" : "https://[email protected]/MY_REPO_URL.git" } }
Or with SSH:
{ "dependencies": { "my_package_name": "[email protected]:username/MY_REPO_URL.git" } }
This works like a charm.
Use SSH-like clone URL:
{ "dependencies": { "my_package_name": "[email protected]:user/repo.git" } }
Your system should have authorized SSH key.
It works for me! Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With