How to login to codeartifact for a single project

166 views Asked by At

I have the following structure:

nodejs_projects_directory
    ├ project_A
    │   └ node_modules/codeartifact_dependencies
    └ project_B
        └ node_modules/npm_dependencies

I have to login to codeartifact to install the project_A dependencies, but then if I have to work on project_B, the npm install/yarn install goes to project_A's codeartifact repository. I have to either delete the ~/.npmrc file or login to codeartifact from the CLI every time I want to switch between the projects. Is there a way to scope the codeartifact auth token to a specific directory?

I referred to this question: How to run AWS codeartifact login and keep default registry

But it says about namespacing not directory specific login.

0

There are 0 answers