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.
Related
Following the instructions here, I've tried to install Jfrog Artifactory (OSS version) via Docker, but I get an error:
$ docker run --name artifactory -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-oss:latest
Unable to find image 'releases-docker.jfrog.io/jfrog/artifactory-oss:latest' locally
docker: Error response from daemon: unauthorized: The client does not have permission for manifest.
See 'docker run --help'.
$
It seems that the Docker image repo isn't accepting anonymous downloads.
There was an issue with latest tag, and we fixed the tag.
Thanks for updating us.
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.
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
I have following settings with my ec2 instance, but no luck.
And there is a same issue on aws forum but no answer.
~/.gitconfig:
[credential]
helper = !aws --region us-east-1 codecommit credential-helper $#
UseHttpPath = true
IAM Role Policy for the EC2 Instance:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codecommit:*"
],
"Resource": "*"
}
]
}
Then following code works:
echo -e "protocol=https\npath=/v1/repos/my-repo\nhost=git-codecommit.us-east-1.amazonaws.com" | aws --region us-east-1 codecommit credential-helper get
However, with git, it doesn't.
git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-repo
Cloning into 'my-repo'...
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-repo/': The requested URL returned error: 403
Any ideas?
UPDATE
After some investigation, I figure out that attached IAM Role doesn't work git operation, but IAM User worked fine.
| Type | list-repositories | credential-helper | git operation |
| IAM User with CodeCommitFullAccess | OK | OK | OK |
| IAM Role with CodeCommitFullAccess | OK | OK | NG |
Tries following command:
list-repositories
aws codecommit list-repositories
credential-helper
echo -e "protocol=http\npath=/v1/repos/my-repo\nhost=git-codecommit.us-east-1.amazonaws.com" | aws --region=us-east-1 codecommit credential-helper get
git operation
git clone --config credential.helper='!aws --region=us-east-1 codecommit credential-helper $#' --config credential.UseHttpPath=true https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-repo
my awscli version is following:
$ aws --version
aws-cli/1.10.44 Python/2.7.5 Linux/3.10.0-327.10.1.el7.x86_64 botocore/1.4.34
Update2
My git and curl version is as following:
$ git --version
git version 1.8.3.1
$ curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.19.1 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz
You need to be using at least curl 7.33 or later. From the CodeCommit documentation:
AWS CodeCommit requires curl 7.33 and later. However, there is a known issue with HTTPS
and curl update 7.41.0.
I have followed the following Guide for Setup of designate.
http://docs.openstack.org/developer/designate/install/ubuntu.html
Above guide is having the exact workflow what I was looking for.
I need to setup Designate using PowerDns Backend. It provides way for doing the same.
But In case of Registering Designate with Keystone it lacks in Detail.
Please some one help me regarding the same.
Now I am trying to access http://IP.Address:9001/v2/command.
It gives error as follows:
Authentication required
Error log from designate-api:
2015-10-20 03:58:36.917 20993 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
2015-10-20 03:58:36.917 20993 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
2015-10-20 03:58:36.917 20993 INFO eventlet.wsgi [-] 61.12.45.30 - - [20/Oct/2015 03:58:36] "GET /v1/ HTTP/1.1" 401 217 0.000681
I found the way for doing the same.
Here it is detailed steps attached.
Registering keystone with designate:
Kestone Setup:
apt-get install keystone
Edit /etc/keystone/keystone.conf and change the [database] section:
connection = mysql://keystone:keystone#localhost/keystone
rm /var/lib/keystone/keystone.db
$ mysql -u root -p
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'#'localhost' \
IDENTIFIED BY 'keystone';
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'#'%' \
IDENTIFIED BY 'keystone';
mysql> exit
pip install mysql-python
su -s /bin/sh -c "keystone-manage db_sync" keystone
Execute the following command note down the value:
openssl rand -hex 10
Edit /etc/keystone/keystone.conf and change the [DEFAULT] section, replacing ADMIN_TOKEN with the results of the command:
[DEFAULT]
# A "shared secret" between keystone and other openstack services
admin_token = ADMIN_TOKEN
Configure the log directory. Edit the /etc/keystone/keystone.conf file and update the [DEFAULT] section:
[DEFAULT]
...
log_dir = /var/log/keystone
service keystone restart
Users tenants service and endpoint creation:
export OS_SERVICE_TOKEN=token_value
(please edit the token value generated above)
export OS_SERVICE_ENDPOINT=http://localhost:35357/v2.0
keystone tenant-create --name service --description "Service Tenant" --enabled true
keystone service-create --type dns --name designate --description="Designate"
keystone endpoint-create --service designate --publicurl http://127.0.0.1:9001/v1 --adminurl http://127.0.0.1:9001/v1 --internalurl http://127.0.0.1:9001/v1
keystone user-create --name dnsaas --tenant service --pass dnsaas --enabled true
keystone role-create --name=admin
keystone user-role-add --user dnsaas --tenant service --role admin
apt-get install python-designateclient
Create an openrc file:
$ vi openrc
export OS_USERNAME=dnsaas
export OS_PASSWORD=dnsaas
export OS_TENANT_NAME=service
export OS_AUTH_URL=http://localhost:5000/v2.0/
export OS_AUTH_STRATEGY=keystone
export OS_REGION_NAME=RegionOne
source an openrc file:
. openrc
Note :
Execute or restart the designate-central and designate-api services.
designate domain-list command
designate domain-list
Above command is not returing any errors means fine to go.