Private package in CodeArtifact: Repository not found
NickName:goldfishalpha Ask DateTime:2022-11-16T19:03:52

Private package in CodeArtifact: Repository not found

I have a private package in a CodeArtifact repository npm cannot find it. I have tried installing from a package.json and copying and pasting the suggested command from AWS dashboard; npm install @myproject/[email protected].

I am getting an error

npm ERR! code E404
npm ERR! 404 Not Found - GET https://company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/@myproject%2fauthentication - Repository not found.
npm ERR! 404
npm ERR! 404  '@myproject/[email protected]' is not in this registry.

my .npmrc includes

@myproject:registry=https://company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/
//company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/:always-auth=true
//company-112233445566.d.codeartifact.eu-west-1.amazonaws.com/npm/myrepo/:_authToken=${CODEARTIFACT_AUTH_TOKEN}

However,I can see the repo on the dsahboard and the query aws codeartifact list-package-versions --package authentication --domain company --domain-owner 112233445566 --repository myrepo --format npm --namespace myproject returns

{
    "versions": [
        {
            "version": "1.0.93",
            "revision": "<somebase64string>",
            "status": "Published",
            "origin": {
                "domainEntryPoint": {
                    "repositoryName": "myrepo"
                },
                "originType": "INTERNAL"
            }
        }
    ],
    "defaultDisplayVersion": "1.0.93",
    "format": "npm",
    "package": "authentication",
    "namespace": "myproject"
}

Could it be the %2f being used in the request rather then a '/'?

I should mention that I am using WSL (Ubuntu) on Windows10. I do not think this is the issue however, since this setup work with a private verdaccio server (https://verdaccio.org/).

Copyright Notice:Content Author:「goldfishalpha」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74459365/private-package-in-codeartifact-repository-not-found

More about “Private package in CodeArtifact: Repository not found” related questions

Private package in CodeArtifact: Repository not found

I have a private package in a CodeArtifact repository npm cannot find it. I have tried installing from a package.json and copying and pasting the suggested command from AWS dashboard; npm install @

Show Detail

AWS Codeartifact not pointing to private repository

Following the AWS instructions, I can authenticate codeartifact on Linux via aws codeartifact login --tool twine --repository pypi-mystore --domain mydomain --dom ain-owner xxxxxxxxxxx But when try...

Show Detail

AWS Codeartifact npm private repository fail to download dependencies

I have this situation: I created a npm package and deployed it into AWS CodeArtifact. This artifact depends of aws-sdk package. When I tried to use the new packege from other project, fallowing

Show Detail

AWS CLI CodeArtifact : What value to supply for --package flag for list-package-versions subcommand

Problem Statement I am trying to see what versions have been deployed for a specific Maven package in AWS CodeArtifact. I do not have the ability to view anything through the web GUI so I am using...

Show Detail

npm publish not working on AWS CodeArtifact

I am trying to use npm publish to publish a javascript library to a private NPM repository hosted on AWS Codeartifact. When I try running npm publish on my local machine, it works without any issues.

Show Detail

Blocking certain public packages with AWS CodeArtifact

I'm hoping to create a private CodeArtifact PyPI repo with an upstream that connects to the public PyPI repo. The private repo will store packages with a certain prefix. Examples: foo.databases foo.

Show Detail

Is it possible to configure AWS CodeArtifact PyPi repository to be used in AWS MWAA?

AWS MWAA (Managed Workflows for Apache Airflow) is relatively new service provided by AWS. When configuring the MWAA environment, it is possible to provide custom requirements.txt file, which is us...

Show Detail

Error in AWS Amplify build when referencing private package in AWS CodeArtifact

I have a private npm package that I have published to AWS CodeArtifact so I can use it across a ReactJS App and NodeJS/Express API app. Version 1.0.0 of this package is published to CodeArtifact. I...

Show Detail

AWS CodeArtifact Repository policy

have a question on repository policy in AWS Codeartifact. We have created the Domain and the repositories within artifact. Now we need to restrict the repositories so that a user can ONLY pull from

Show Detail

PyCharm poetry.lock failing due to private aws codeartifact repository

I've set up my project in PyCharm to use poetry and have a private repository in AWS CodeArtifact that I need to reference. Manually I got that working and the install/lock process works fine via

Show Detail