Not able to upload the artifact using jfrog-cli command line - artifactory

I am trying to upload a artifact using following command:
jfrog rt u "win_b64" http://localhost:8082/artifactory/Test
I am getting the below output:
{
"status": "success",
"totals": {
"success": 0,
"failure": 0
}
}
But I am not able to see anything on the artifactory.

Please try: jfrog rt u win_b64 Test/
Can you also specify your OS?

try jfrog rt u win_b64 Test/ --url http://localhost:8081/artifactory/ --user admin --password password

Related

conan user against Jfrog Academy docker Artifactory-CE returns 404

I'm following the Jfrog Academy tutorial. It uses an Artifactory CE in a docker image. I'm at the lesson where you first upload packages to Artifactory.
I added a user and repo and gave the user access to the repo. But when I do
conan user -p PASSWORD -r REPO USERNAME
I get
ERROR: {
"errors" : [ {
"status" : 404,
"message" : "File not found."
} ]
}. [Remote: artifactory]
I did check for typos, such as in the user name and password.
It seems like it is unable to find the remote repository. I tried steps similar to below to configure Conan without any issues.
conan remote add <REMOTE> http://127.0.0.1:8081/artifactory/api/conan/<repository>
conan user -p <API-KEY> -r <REMOTE> <username>
If you still have any issues, enable CONAN_LOGGING_LEVEL to debug and see if that helps with additional information on the issue.

Error - Artifactory response: 405 Method Not Allowed

I'm trying to download a file from my Jfrog artifactory to my local machine with CLI command:
jfrog rt dl --user *username* --password *password* -url https://*domain*.jfrog.io/artifactory/*my-folder-name*/ --flat=false * c:/jfrog/
I'm getting:
Log path: C:\Users\Administrator\.jfrog\logs\jfrog-cli.2020-08-19.18-38-11.3780.log
{ "status": "failure",
"totals": {
"success": 0,
"failure": 0
}
}
[Error] Download finished with errors, please review the logs.
From the logs:
[Error] Artifactory response: 405 Method Not Allowed
but, when I'm running jfrog rt ping I'm getting
"OK"
The reason you are getting 405 is that JFrog CLI is trying ping the Artifactory using the --url https://domain.jfrog.io/artifactory/my-folder-name/. To overcome this you should try to download using the below JFrog CLI,
jfrog rt dl --user username --password password -url
https://domain.jfrog.io/artifactory/ "<repository_key>/" --flat=false *
c:/jfrog/
For example, if I want to download any artifacts from the "generic-local" repository under "jars" folder then my JFrog CLI command would be as below,
$ jfrog rt dl --user admin --password password -url
http://localhost:8081/artifactory "generic-local/jars/"
--flat=false
It should download all the artifacts under "generic-local/jars" under the current directory.

How to import system backup to Artifactory using JFrog cli

I've run Artifactory using Docker.
Downloaded JFrog cli inside the container and configured it.
So ./jfrog rt ping returns
OK
Is there a way to perform system level export/import using JFrog cli?
Succeeded to perform it using web ui. Couldn't find information on how to perform system level export/import in the documentation.
Edit
Succeeded to perform export using REST API:
curl -u admin:pass -X POST -H "Content-Type: application/json" --data #/tmp/export-settings.json http://localhost:8081/artifactory/api/export/system
You can invoke the same REST API using JFrog CLI's curl command as shown below. This way, you don't need to provide the URL and credentials. JFrog CLI's config storage will be used. You can manage this storage using the jfrog rt c command.
If you have multiple Artifactory severs configured, and you don't want to use the default server, the jfrog rt curl command also accepts the --server-id option, with the pre configured Artifactory server ID as the valve.
jfrog rt curl -X POST -H "Content-Type: application/json" --data #/tmp/export-settings.json api/export/system
This feature is currently not supported by the CLI.
Feel free to create a feature request.

How to change artifactory admin default password through command line

i have installed latest version of Artifactory Pro (5.8.3) on Centos7. The default admin credentials are admin/password. i want to change the password through command-line but unable to do so.
Does any one has any inputs how to do this?
Following troubleshootings i tried:
jfrog rt c rt-server-1 --url=http://domain/artifactory --user=admin --password=password ...
nothing happens , when i try to use a new password i get 401: unauthorize error
jfrog guide tells to generate security.xml and add the hash code of the new password but security.xml does not get generated even after following all their steps.
also tried to use curl commands but no use.
If any one has gone through similar issue please share your findings. let me know if you need more info.know on case
JFrog CLI currently does not support changing of a user's password. the CLI config method you were using simply lets you configure your server and credentials to be used by other CLI command later.
What you can do is use a simple curl command to invoke the change password API as described here.
specifically, in your example changing the Admin's password to "NewPassword" will be something like:
curl -X POST -u admin:password -H "Content-type: application/json" -d '{ "userName" : "admin", "oldPassword" : "password", "newPassword1" : "NewPassword", "newPassword2" : "NewPassword" }' http://yourartifactory:8081/artifactory/api/security/users/authorization/changePassword

Apigeetool deploy error

I'm trying to deploy from apigee tool with the following command:
apigeetool deployproxy -n my_proxy_name -o myorgname -e test -d apiproxy-3/ -b my_base_path -u myusername -p mypassword
and getting always this:
Import failed to /v1/organizations/myorg/apis?action=import&name=my_proxy_name with status 400:
{
"code" : "messaging.config.beans.InvalidBundle",
"message" : "Bundle is invalid. Unable to read/find APIProxy contents",
"contexts" : [ ]
}
At first I thought it was my proxy development.. so I tried downloading the proxy as zip file, uncompressing it, and then uploading from this command without any changes, and got the same thing.
Could this be a problem with me being on yosemite dev build 2?
the issue here is with the paid hosted option, it seems My org was having an isse and support is looking into it.
Try renaming the subdirectory from apiproxy-3 to apiproxy, then retry.

Resources