0

I have a local bitbucket server git.mydomain.com I can access the repository from SourceTree and do clone I can see the repo is:
http://hadar.m@git.mydomain.com:7990/scm/st/my-project.git

I have another projects I want to add package "my-project" as a dependency to it, so in the packages.json file I write

"dependencies": {
"@angular/common": "~2.1.0",
[... all other deps ... ],
"my-lib": "http://hadar.m@git.mydomain.com:7990/scm/st/my-project.git " }

as I run npm install command I get error : " fetch failed with status code 401" for this package . I've read I need to access via git+ssh and did so enabled it inside the Bitbucket admin . I've changed the packages.json to :

"my-lib": "git+ssh://hadar.m@git.mydomain.com:7999/scm/st/my-project.git#master"   

the port changed to 7999 from 7990 , still error is now :

Could not read from remote repository. Please make sure you have the correct access rights

What am I doing wrong / What is the correct way to do so ?

edit:
I've created an access key in the server , after it I add this access key to the repository with read access, label : "hadar@mydomain.com" key:"[...access-key...]"
now I don't know how to construct the url to install the package.

Haddar Macdasi
  • 3,477
  • 8
  • 37
  • 59

0 Answers0