I'm getting 404 - not found error when trying to download pn from a generic artifactory repo using artifactory api. But can be downloaded directly from Artifactory UI.
Is this a known fact?
Or is there a workaround?
When using powershell webclient
"The remote server returned an error: (404) Not Found."
When using postman GET
https://artifactory url/artifactory/testpng/test-1.png
{
"errors" : [ {
"status" : 404,
"message" : "Not Found"
} ]
}
There should not be any problem when attempting to download or upload png files when using the API correctly.
The best way to work with Artifactory Repositories is by following the "Set Me Up" tool in the UI, under Applications->Artifacts, and clicking on the "Set Me Up" button in the top right corner and choosing the relevant repository.
The correct command for a Local Generic Repository should be:
$curl -H "X-JFrog-Art-Api:<API_KEY>" -O "https://ARTIFACTORY-URL/artifactory/example-generic-local/<TARGET_FILE_PATH>"
If this still doesn't work for you, share your version* of artifactory and if you are a SaaS/On-prem
** To get the version, use the REST API:
$curl -u user:password https://ARTIFACTORY-URL/artifactory/api/system/version
Related
I have created (using terraform resource google_artifact_registry_repository) a python repository on Google Artifact Registry. Here's my terraform code that created it:
resource "google_artifact_registry_repository" "pypi" {
provider = google-beta
project = var.project_id
location = var.region
repository_id = "dataplatformpypi"
description = "PyPi repo for use by dataplatform"
format = "PYTHON"
}
here is that repository:
I am now following the quickstart at https://cloud.google.com/artifact-registry/docs/python/quickstart, specifically the Configure authentication section which instructs me to issue gcloud artifacts print-settings python. I actually modify that slightly to issue:
gcloud --project myproject artifacts print-settings python --repository dataplatformpypi --location europe-west2
and I get error:
ERROR: (gcloud.artifacts.print-settings.python) Invalid repository type PYTHON. Valid type is PYPI.
I haven't specified the repository type as part of that command so I can only assume that "repository type PYTHON" refers to the format of the repository:
However given that the repository has been created successfully and PYTHON is (according to the terraform resource documentation) a valid value for the repository format I am struggling to understand what the problem is here.
I would appreciate any advice.
It doesn't appear to be a user-specific problem. Other users have also encountered the issue. There's a similar issue ongoing in GitHub. You can follow the thread here.
I would like to use https://registry.yarnpkg.com as my package registry for all packages except 1 that I am hosting on Azure Artifacts.
I have the following .yarnrc.yml file
yarnPath: ".yarn/releases/yarn-berry.js"
npmScopese:
my-scope:
npmRegistryServer: 'https://pkgs.dev.azure.com/<my-org>/_packaging/<my-feed>/npm'/registry/'
npmAlwaysAuth: true
npmAuthIdent: 'my-auth-stuff'
then in the console I run
yarn add #my-scope/my-package#1.0.0
I get the following error
#my-scope/my-package#npm:1.0.0: Response code 404 (Not Found)
The following returns a 200 response
curl GET 'https://pkgs.dev.azure.com/<my-org>/_packaging/<my-feed>/npm/registry/<my-package>' --header 'Authorization: <my-auth>'
Not sure if am missing something. Any help would be appreciated.
For anybody who comes across this
I solved it by changed my package name to #my-scope/my-package in artifacts.
i'm using the following curl command to import the output.xml file into jira test execution key and receiving error as below. I'm sure the test execution key is existing in jira and the project id is also correct. Any pointers?
curl -H "Content-Type: multipart/form-data" -u userid:pass -F "file=#output.xml" "https://server/rest/raven/latest/import/execution/robot?projectKey=PROJKEY+and+testExecKey=TESTEXNKEY" -o error.txt
The error i receive is as below
The User "userid" does not have permission to create issues
Why does it try to create new issue while the issue already exists? And why does it say the user doesn't have access when the access is there?
You probably mean Xray add-on and you probably use the same request per their documentation. The problem seems to be with your parameter syntax. It should be .../robot/?projectKey=PROJKEY&testExecKey=TESTEXNKEY (i.e. & instead of +and+).
Plus I would explicitly specify it's a POST request: curl -X POST ....
But their error message is not clear, anyway. I don't have Xray available right now, but if you keep having troubles, I would recommend checking with their support.
I'm using eclipse mars.2 and subclipse 3. The configuration from svn is ok. I was working with a false user in Windows, e.g "Fran" and now that is correct, "Frank", I'm not allowed to acces to this svn.
I had deleted everything in the Folder AppData/Roaming/Subversion/auth.
in cmd I have: svn list https://mysubversion
ask me for the certificate and than p (accept)
I have the first error "svn: E120108: Unable to connect to a repository at URL"
when I try once again my list command, I get the
"svn: E175002: Unexpected HTTP Status 405 'Method Not Allowed' on"
"svn: E175002: PROPFIND request on "" failed: 405 Method not allowed"
I had readed in the Forum but everybody had Connection to the server, I don't. I can see my repository in the browser but that's all.
The normal way to set a new user name for your SVN repository is following:
Open the SVN Repository Exploring Perspective
Rightclick on the repository and choose Location Properties..
Check beneath Authentication the textbox User
If that doesn't help, you probaby saved your credentials in the Secure Storage..
To clear the storage:
Go to: Preferences -> General -> Security -> Secure Storage
Choose the Contents tab
Search for SVN
Press Delete
I upload a file like this:
curl -u ${CREDS} --upload-file ${file} ${url}
Is there a way to add a body or headers that will set some metadata for the file? Like build number.
You can actually deploy artifacts with properties to Artifactory OSS using matrix parameters, for example:
curl -uadmin:password -T file.tar "http://localhost:8081/artifactory/generic-local/file.tar;foo=bar;"
And get the artifact properties using REST API, for example:
curl -uadmin:password "http://localhost:8081/artifactory/api/storage/generic-local/file.tar?properties"
Viewing properties from the UI and other features are limited to the Pro edition.
Seems this is a pro feature. Documentation: Set Item Properties
PUT /api/storage/{repoKey}{itemPath}?properties=p1=v1[,v2][|p2=v3][&recursive=1]
Not helping me :-/