Have a question? Want to report an issue? Contact JFrog support

Skip to end of metadata
Go to start of metadata

Overview

This page describes how to use JFrog CLI with JFrog Bintray.

Syntax

When used with JFrog Bintray, JFrog CLI uses the following syntax:

$ jfrog bt command-name global-options command-options arguments

where:

command-name
The command to execute. Note that you can use either the full command name or its abbreviation.
global-options

A set of global options that may be used for all commands:

--user: (Optional) The Bintray user.

--key: (Optional) The user's Bintray API key.

command-options
A set of options corresponding to the command
arguments
A set of arguments corresponding to the comman

Page Contents


Commands

The following sections describe the commands available in the JFrog CLI for use with Artifactory. 

Uploading Files 

This command is used to upload files to Artifactory.

Command name
upload
Abbreviation
u
Command options

When using the * or ; characters in the upload command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

--user

[Optional] The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key[Optional]
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.
--flat

[Default: true]

If true, artifacts are uploaded to the exact target path specified and their hierarchy in the source file system is ignored.

If false, artifacts are uploaded to the target path while maintaining their file system hierarchy.

--flat

[Default: true]

If true, artifacts are uploaded to the exact target path specified and their hierarchy in the source file system is ignored.

If false, artifacts are uploaded to the target path while maintaining their file system hierarchy.

--recursive

[Default: true]

If true, artifacts are also collected from sub-folders of the source directory for upload .

If false, only artifacts specifically in the source directory are uploaded.

--regexp

[Default: false]

If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as a regular expression.

If false, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as a wild-card expression.

--publish

(Default: false)

When true, uploaded files will automatically be published.

--override

(Default: false)

When true, existing published files will be overridden by uploaded files with the same name and path.

--explode

(Default: false)
When true, archives are exploded following upload.

--threads

(Default: 3)
The number of threads that should be used for parallel upload of files. Each thread uploads one file at a time.

--dry-run

[Default: false]

If true, the command only indicates which artifacts would have been uploaded

If false, the command is fully executed and uploads artifacts as specified

--deb

(Optional)
Used when uploading Debian packages to specify the distribution, component, and architecture of the the files being uploaded in the following format: distribution/component/architecture.
For example, --deb=trusty/main/i386

--licenses

Comma-separated list of licenses that should be attached to uploaded packages.
Mandatory for OSS packages unless default licenses have been configured using the config command.

--vcs-url

(Mandatory for OSS packages)
The URL of the version control repository hosting the package’s source files.

--pub-dn

(Default: false)
When true, download numbers will be public.

--pub-stats

(Default: false)
When true, full download stats will be public. Available for premium repositories only.

--desc

(Optional)
The package description.

--labels

(Optional)
Comma-separated list of package labels. For example, "QA","Production".

--cust-licenses

(Optional)
Comma-separated list of custom licenses. For example, "MyLicense1","MyLicense2".

--website-url

(Optional)
The package website URL.

--issuetracker-url

(Optional)
The package issue tracker URL.

--github-repo

(Optional)
The package’s GitHub repository.

--github-rel-notes

(Optional)
The package’s GitHub release notes file.

--github-tag-rel-notes

(Default: false)
When true, the package uses a GitHub tag release notes file.

--desc

(Optional)
The version description.

--released

(Optional)
The version release date in ISO8602 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ).

--github-rel-notes

(Optional)
The version’s GitHub release notes file.

--vcs-tag

(Optional)
The version’s VCS tag.

  
Command arguments
Note: Working on Windows?
When working on Windows, the source path is interpreted by the CLI on your Windows system, so you need to specify the source path in Windows notation using \\ instead of the / character.
The target path specified is interpreted by Artifactory which assumes a Unix-like notation, so the target path should be specified using the / character.

Source path

The first argument specifies the local file system path to artifacts which should be uploaded to Bintray. You can specify multiple artifacts by using wildcards or a regular expression as designated by the --regexp command option.
If you have specified that you are using regular expressions, then the first one used in the argument must be enclosed in parenthesis.

Target location

The second argument specifies the location within Bintray for uploaded file, in the form of subject/repository/package/version.

Target path

(Optional)

This third optional argument lets you specify a path under the target location to where the files should be uploaded.

NOTE: that the path should end with a slash (/) to indicate a directory, otherwise the last element in your path will be interpreted as a file name, and the file you upload will be renamed to that filename.

For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} etc. which are replaced by corresponding tokens in the source path that are enclosed in parenthesis.

Examples

Example 1

The following command uploads all files under mydir/mysubdir with names that start with "frog" to the root path under version 1.0 of package frog-package where:
Subject: my-org
Repository: swamp-repo
Package: frog-package
Version: 1.0

 

It is assumed that the Bintray username and API key have been set using the config command.

On linux-based systems
jfrog bt u "mydir/mysubdir/frog*" my-org/swamp-repo/frog-package/1.0

Checking if package frog-package exists...
Checking if version 1.0 exists...
[Thread 2] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/frog-legs.txt
[Thread 0] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/frog-help.txt
[Thread 1] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/frogger.txt
[Thread 2] Bintray response: 201 Created
[Thread 1] Bintray response: 201 Created
[Thread 0] Bintray response: 201 Created
Uploaded 3 artifacts to Bintray.

Example 2

To repeat Example 1, but upload the files to path the/swamp/ under the root path specified, the upload command would be as follows:

On linux-based systems
jfrog bt u "mydir/mysubdir/frog*" my-org/swamp-repo/frog-package/1.0 the/swamp/

Checking if package frog-package exists...
Checking if version 1.0 exists...
[Thread 2] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/the/swamp/frog-legs.txt
[Thread 0] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/the/swamp/frog-help.txt
[Thread 1] Uploading artifact to: https://api.bintray.com/content/my-org/swamp-repo/frog-package/1.0/the/swamp/frogger.txt
[Thread 2] Bintray response: 201 Created
[Thread 1] Bintray response: 201 Created
[Thread 0] Bintray response: 201 Created
Uploaded 3 artifacts to Bintray.

 

Downloading a File

This command is used to download a specific file from Bintray into the CLI’s current directory.

Command name

download-file

Abbreviation
 dlf
Command options

 

 

--user

(Optional)
The Bintray username. If not set, either as a command option, or through the config command, thesubject element in the command argument (the Bintray source path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--flat

(Default: true)
When true, all files are loaded into the current directory. The directory and file hierarchy in the source path on Bintray is lost.
When false, and the target path ends with a "slash", files are downloaded to the current directory while maintaining the hierarchy of the source file system.

--split-count

[Default: 3]
The number of segments into which the file should be split for download (provided the artifact is bigger than the size specified in the --min-split option). To download each file in a single thread without splitting it to segments, set to 0.

--min-split

[Default: 5120]
The minimum size permitted for splitting. Files larger than the specified number will be split into a number of equally sized segments as specified in the --split-count option. Any files smaller than the specified number will be downloaded in a single thread. If set to -1, files are not split.

--unpublished

[Default: false]

Download both published and unpublished files.

  
Command arguments
The command takes one argument

Source path

The path, in Bintray, to the file that should be downloaded.
Format: subject/repository/path

Target path

(Optional)

 This second optional argument lets you specify a path in local file system to where the file should be downloaded.

Example

The following command downloads a file called crazy-frog.zip from:
Subject: my-org
Repository: swamp-repo
Path: com/jfrog/bintray

It is assumed that the Bintray username and API key have been set using the config command.

jfrog bt dlf my-org/swamp-repo/com/jfrog/bintray/crazy-frog.zip

Downloading https://dl.bintray.com/my-org/swamp-repo/com/jfrog/bintray/crazy-frog.zip
Bintray response: 200 OK

Downloading a Version

This command is used to download all files from a specific version of a package into the CLI’s current directory.

Command name

download-ver

Abbreviation
 dlv
Command options

 

 

--user

(Optional)
The Bintray username. If not set, either as a command option, or through the config command, the subject element in the command argument (the Bintray source path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--flat

(Default: true)
When true, all files are loaded into the current directory. The directory and file hierarchy in the source path on Bintray is lost.
When false, and the target path ends with a "slash", files are downloaded to the current directory while maintaining the hierarchy of the source file system.

--threads

[Default: 3]
The number of threads that should be used for parallel download of files. Each thread downloads one file at a time.

--split-count

[Default: 3]
The number of segments into which the file should be split for download (provided the artifact is bigger than the size specified in the --min-split option). To download each file in a single thread without splitting it to segments, set to 0.

--min-split

[Default: 5120]
The minimum size permitted for splitting. Files larger than the specified number will be split into a number of equally sized segments as specified in the --split-count option. Any files smaller than the specified number will be downloaded in a single thread. If set to -1, files are not split.

--unpublished

[Default: false]

Download both published and unpublished files.

Command arguments
 
Source pathThe path, in Bintray, to the version whose files should be downloaded.
Format: subject/repository/package/version/
Target path

(Optional)
This second optional argument lets you specify a path in local file system to where the version files should be downloaded.

Example

The following command downloads all files from:
Subject: my-org
Repository: swamp-repo
Package: frog-package
Version: 1.0

It is assumed that the Bintray username and API key have been set using the config command.

jfrog bt dlv my-org/swamp-repo/frog-package/1.0

 

Creating a Package

Command name

package-create

Abbreviation
pc 
Command options

 

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--licenses

Comma-separated list of licenses that should be attached to uploaded packages.
Mandatory for OSS packages unless default licenses have been configured using the config command.

--vcs-url

(Mandatory for OSS packages)
The URL of the version control repository hosting the package’s source files.

--pub-dn

(Default: false)
When true, download numbers will be public.

--pub-stats

(Default: true)
When true, full download stats will be public. Available for premium repositories only.

--desc

(Optional)
The package description.

--labels

(Optional)
Comma-separated list of package labels. For example, "QA","Production".

--cust-licenses

(Optional)
Comma-separated list of custom licenses. For example, "MyLicense1","MyLicense2".

--website-url

(Optional)
The package website URL.

--issuetracker-url

(Optional)
The package issue tracker URL.

--github-repo

(Optional)
The package’s GitHub repository.

--github-rel-notes

(Optional)
The package’s GitHub release notes file.

  
Command arguments
 
Target path

The path, in Bintray, to the package that should be created.
Format: subject/repository/package

Example

The command below creates the following package:
Subject: my-org
Repository: swamp-repo
Package: frog-package

It is assumed that the Bintray username and API key have been set using the config command.

jfrog bt pc my-org/swamp-repo/frog-package
Creating package: frog-package
Bintray response: 201 Created
{
  "name": "frog-package",
  "repo": "swamp-repo",
  "owner": "my-org",
  "desc": null,
  "labels": [],
  "attribute_names": [],
  "licenses": [
    "AGPL-V3"
  ],
  "custom_licenses": [],
  "followers_count": 0,
  "created": "2016-03-02T10:47:22.454Z",
  "website_url": null,
  "issue_tracker_url": null,
  "github_repo": "",
  "github_release_notes_file": "",
  "public_download_numbers": false,
  "public_stats": true,
  "linked_to_repos": [],
  "versions": [],
  "latest_version": null,
  "updated": "2016-03-02T10:47:22.468Z",
  "rating_count": 0,
  "system_ids": [],
  "vcs_url": "http://www.github.com",
  "maturity": ""
}

 

Updating a Package

Command name
package-update
Abbreviation
pu
Command options

 

 

-user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--licenses

Comma-separated list of licenses that should be attached to uploaded packages.
Mandatory for OSS packages unless default licenses have been configured using the config command.

--vcs-url

(Mandatory for OSS packages)
The URL of the version control repository hosting the package’s source files.

--pub-dn

(Default: false)
When true, download numbers will be public.

-pub-stats

(Default: true)
When true, full download stats will be public. Available for premium repositories only.

--desc

(Optional)
The package description.

--labels

(Optional)
Comma-separated list of package labels. For example, "QA","Production".

--cust-licenses

(Optional)
Comma-separated list of custom licenses. For example, "MyLicense1","MyLicense2".

--website-url

(Optional)
The package website URL.

--issuetracker-url

(Optional)
The package issue tracker URL.

--github-repo

(Optional)
The package’s GitHub repository.

--github-rel-notes

(Optional)
The package’s GitHub release notes file.

  
Command arguments
The command takes two arguments

Target path

The path, in Bintray, to the package that should be updated.
Format: subject/repository/package

Example

The command below updates the description of the following package:
Subject: my-org
Repository: swamp-repo
Package: frog-package

It is assumed that the Bintray username and API key have been set using the config command.

 jfrog bt pu my-org/swamp-repo/frog-package --desc="New Description"
Bintray response: 200 OK
{
  "message": "success"
}

 

Getting Package Details

Command name
package-show
Abbreviation
ps
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

Command arguments
 

Source path

The path, in Bintray, to the package whose details should be retrieved.
Format: subject/repository/package

Example

The following command retrieves package details for:
Subject: my-org
Repository: swamp-repo
Package: frog-package

It is assumed that the Bintray username and API key have been set using the config command.

 jfrog bt ps my-org/swamp-repo/frog-package
Getting package: MyLogger
{
  "name": "frog-package",
  "repo": "swamp-repo",
  "owner": "my-org",
  "desc": null,
  "labels": [],
  "attribute_names": [],
  "licenses": [],
  "custom_licenses": [],
  "followers_count": 0,
  "created": "2015-11-24T10:25:34.397Z",
  "website_url": null,
  "issue_tracker_url": null,
  "github_repo": "",
  "github_release_notes_file": "",
  "public_download_numbers": false,
  "public_stats": true,
  "linked_to_repos": [],
  "versions": [
    "1.0.0.0"
  ],
  "latest_version": "1.0.0.0",
  "updated": "2015-11-24T10:25:34.950Z",
  "rating_count": 0,
  "system_ids": [],
  "vcs_url": null,
  "maturity": ""
}

 

Deleting a Package 

Command name
package-delete
Abbreviation
pd
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--quiet

(Default: false)
When true, the delete confirmation message is skipped.

Command arguments
 

Target path

The path, in Bintray, to the package that should be deleted.
Format: subject/repository/package

 Example

The command below deletes the following package and skips the delete confirmation:

Subject: my-org
Repository: swamp-repo
Package: frog-package

It is assumed that the Bintray username and API key have been set using the config command. 

jfrog bt pd my-org/swamp-repo/frog-package --quiet=true
Bintray response: 200 OK
Deleting package: MyCLIPackage

 

Creating a Version 

Command name
version-create
Abbreviation
vc
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--github-tag-rel-notes

(Default: false)
When true, the package uses a GitHub tag release notes file.

--desc

(Optional)
The version description.

--released

(Optional)
The version release date in ISO8602 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ).

--github-rel-notes

(Optional)
The version’s GitHub release notes file.

--vcs-tag

(Optional)
The version’s VCS tag.

  
Command arguments
 

Target version

The argument specifies the path to the target version in Bintray.

Example 

The command below creates the following version while setting its description:

Subject: my-org

Repository: swamp-repo
Package: frog-package

Version 1.0

It is assumed that the Bintray username and API key have been set using the config command. 

jfrog bt vc my-org/swamp-repo/frog-package/1.0 --desc="Description via CLI"
Creating version: 1.0
Bintray response: 201 Created
{
  "name": "1.0",
  "desc": "Description via CLI",
  "package": "frog-package",
  "repo": "swamp-repo",
  "owner": "my-org",
  "labels": [],
  "attribute_names": [],
  "created": "2016-03-02T14:20:44.479Z",
  "updated": "2016-03-02T14:20:44.620Z",
  "released": "",
  "ordinal": 1.0,
  "github_release_notes_file": null,
  "github_use_tag_release_notes": false,
  "vcs_tag": null
}

 

Updating a Version 

Command name
version-update
Abbreviation
vu
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--github-tag-rel-notes

(Default: false)
When true, the package uses a GitHub tag release notes file.

--desc

(Optional)
The version description.

--released

(Optional)
The version release date in ISO8602 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ).

--github-rel-notes

(Optional)
The version’s GitHub release notes file.

--vcs-tag

(Optional)
The version’s VCS tag.

  
Command arguments
 

Target version

The argument specifies the path to the target version in Bintray.

Example  

The command below updates the following version while setting its description:

Subject: my-org
Repository: swamp-repo

Package: frog-package

Version: 1.0

It is assumed that the Bintray username and API key have been set using the config command. 

jfrog bt vu my-org/swamp-repo/frog-package/1.0 --desc="Description updated via CLI"
Updating version: 1.0
Bintray response: 200 OK
{
  "message": "success"
}

 

Publishing a Version 

Command name
version-publish
Abbreviation
vp
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

  
Command arguments
 

Target version

The argument specifies the path to the target version in Bintray.

Example  

The command below updates the following version while setting its description:

Subject: my-org
Repository: swamp-repo 

Package: frog-package

Version: 1.0

It is assumed that the Bintray username and API key have been set using the config command. 

jfrog bt vp my-org/swamp-repo/frog-package/1.0
Publishing version: 1.0
Bintray response: 200 OK
{
  "files": 1
}

 

Getting Version Details

Command name
version-show
Abbreviation
vs
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

  
Command arguments
 

Target version

The argument specifies the path to the target version in Bintray.

Example 

The command below gets details about the following version:

 Subject: my-org
Repository: swamp-repo
Package: frog-package

Version: 1.0

It is assumed that the Bintray username and API key have been set using the config command. 

jfrog bt vs my-org/swamp-repo/frog-package/1.0
Getting version: 1.0
{
  "name": "1.0",
  "desc": "Description updated via CLI",
  "package": "frog-package",
  "repo": "swamp-repo",
  "owner": "my-org",
  "labels": [],
  "attribute_names": [],
  "created": "2016-03-02T14:20:44.479Z",
  "updated": "2016-03-02T14:28:49.198Z",
  "released": "",
  "ordinal": 1.0,
  "github_release_notes_file": null,
  "github_use_tag_release_notes": false,
  "vcs_tag": null
}

 

Deleting a Version 

Command name
version-delete
Abbreviation
vd
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--quiet

(Default: false)
When true, the delete confirmation message is skipped.

  
Command arguments
 

Target version

The argument specifies the version to delete.

 Example 

The command below deletes the following version:

Subject: my-org
Repository: swamp-repo 
Package: frog-package
Version: 1.0

It is assumed that the Bintray username and API key have been set using the config command. 

 

jfrog bt vd my-org/swamp-repo/frog-package/1.0 --quiet=true
Deleting version: 1.0
Bintray response: 200 OK

 

Managing Entitlements

Command name
entitlements
Abbreviation
ent
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--id

(Optional)
The entitlement’s unique identifier.

--access

(Optional)
Specifies the access mode when creating or updating an entitlement. The access mode can be one of the following two options:
r (read). This only provides download access to the owner’s resource. rw (read/write). This provide download, update, and delete access to the owner’s resource.

--keys

(Optional)
A comma-separated list of the associated keys. Used when creating or updating an entitlement.

--path

(Optional)
The path defining the scope of the entitlement. Used when creating or updating an entitlement.

  
Command arguments
 

Action or Scope

Scope
A scope can be specified as one of the following:
subject/repository
subject/repository/package
subject/repository/package/version
If the first argument is a scope, the command returns a list of IDs of all entitlements currently active on the specified scope.


Action
Action can be one of:
create: Creates a new entitlement with access as specified in the --access option
show: Provides details of the entitlement specified in the --id option
update: Updates the entitlement specified in the --id option
delete: Deletes the entitlement specified in the --id option

Scope

If the first argument is an action, then this argument defines the scope on which the action is applied as described above. 
In addition, for create, the --access option must be specified.
For showupdate, or delete, the --id option must be specified.

Examples

The following examples all assume that the Bintray username and API key have been set using the config command. The examples are applied to the relevant scope where:
Subject: my-org
Repository: swamp-repo
Package: frog-package
Version: 1.0

 

Example 1
The command below provides the IDs of all entitlements currently active on repository my-org/swamp-repo:

jfrog bt ent my-org/swamp-repo
Bintray response: 200 OK
[
  {
    "id": "d51fa4cb6fb18047131e5b6f213983ef95ba1c5c"
  },
  {
    "id": "8831d10a3399cc65010e083a65c8944114a771e6"
  }
]

Example 2

The command below provides the IDs of all entitlements currently active on package my-org/swamp-repo/frog-package:

jfrog bt ent my-org/swamp-repo/frog-package
Bintray response: 200 OK
[
  {
    "id": "8831d10a3399cc65010e083a65c8944114a771e6"
  }
]

Example 3

The command below creates an entitlement with read/write access on package my-org/swamp-repo/frog-package in path a/b/c. At the same time, the command associates keys key1 and key2 with the entitlement:
jfrog bt ent create my-org/swamp-repo/frog-package --access=rw --path=a/b/c --keys=key1,key2
Bintray response: 201 Created
{
  "id": "8831d10a3399cc65010e083a65c8944114a771e6",
  "access": "rw",
  "access_keys": [{key1},{key2}]
}

Example 4

The command below provides details about the entitlement on package my-org/swamp-repo/frog-package with the specified ID:

jfrog bt ent show my-org/swamp-repo/frog-package --id=d51fa4cb6fb18047131e5b6f213983ef95ba1c5c
Bintray response: 200 OK
{
  "id": "d51fa4cb6fb18047131e5b6f213983ef95ba1c5c",
  "access": "rw",
  "access_keys": []
}


Example 5
The command below updates the specified entitlement on package my-org/swamp-repo/frog-package with the specified ID, setting its access mode to r and attaching keys key1 and key2 to it:

jfrog bt ent update my-org/swamp-repo/frog-package --id=d51fa4cb6fb18047131e5b6f213983ef95ba1c5c --access=r --keys=key1,key2
Bintray response: 200 OK
{
  "id": "d51fa4cb6fb18047131e5b6f213983ef95ba1c5c",
  "access": "r",
  "access_keys": [{key1},{key2}]
}


Example 6

The command below deletes the entitlement on package my-org/swamp-repo/frog-package with the specified ID:

jfrog bt ent delete my-org/swamp-repo/frog-package --id=d51fa4cb6fb18047131e5b6f213983ef95ba1c5c
Bintray response: 200 OK

 

Managing Access Keys

Command name
access-keys
Abbreviation
acc-keys
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--org

(Optional)
The Bintray organization.

--password

(Optional)
The access key’s password.

--expiry

(Optional)
The access key’s expiry in Unix epoch time in milliseconds.

--ex-check-url

(Optional)
Used in creation and update of access keys. Used for an existence check directive to verify whether the source identity of the access key still exists. The existence check uses a callback URL, optionally using the access key username and password as tokent. The access key will automatically be removed if 404 is returned by the callback URL.

--ex-check-cache

(Optional)
Used in creation and update of access keys. Specifies the length of time (in seconds) that the results of the existence check callback should be cached. The minimum value is 60 seconds.

--white-cidrs

(Optional)
Used in creation and update of access keys. Specifies white CIDRs meaning that access is restricted to IP addresses in the specified range. Format [a1.b1.c1.d1/e1, a2.b2.c2.d2./e2].

--black-cidrs

(Optional)
Used in creation and update of access keys. Specifies black CIDRs meaning that access is prohibited to IP addresses in the specified range. Format [a1.b1.c1.d1/e1, a2.b2.c2.d2./e2].

  
  
Command arguments
 

Action or non

None: If no arguments are provided, the command provides a list of all access keys active for the subject.

Action
Action can be one of:
create: Creates a new access key
show: Provides details of the entitlement specified in the --id option
update: Updates the entitlement specified in the --id option
delete: Deletes the entitlement specified in the --id option

Key ID

When an action is provided in the first argument, the second argument should be the ID of the key on which the action should be performed.

Examples

The following examples all assume that the Bintray username and API key have been set using the config command. 

Example 1

The commands below create two access keys where the second one specifies an expiry for the key:

jfrog bt acc-keys create key1
Bintray response: 201 Created
{
  "username": "key1@my-org",
  "password": "a3d4838f59bb2e7df4e8b8ca4b4c732be9c069f0"
}

jfrog bt acc-keys create key2 --expiry=7956915742000
Bintray response: 201 Created
{
  "username": "key2@jaycroaker",
  "password": "421bbb43f06ce9510a6a817dbab167ec026a0d34"
}


Example 2

The commands below shows all active access keys:

jfrog bt acc-keys
Bintray response: 200 OK
{
  "access_keys": [
    "key1",
    "key2"
  ]
}


Example 3

The command below shows a specific access key:

jfrog bt acc-keys show key2
Bintray response: 200 OK
{
  "id": "key2",
  "username": "key2@jaycroaker",
  "expiry": 7956915742000,
  "white_cidrs": [],
  "black_cidrs": []
}

 

Example 4

The command below updates an access key setting an existence check callback URL, and white and black CIDRs:

jfrog bt acc-keys update key2  --ex-check-url=http://new-callback.com --white-cidrs=127.0.0.1/22,193.5.0.1/22 --black-cidrs=127.0.0.1/22,193.5.0.1/22
Bintray response: 200 OK
{
  "username": "key2@my-org",
  "password": "5513453efca9012e19f7e64961c6a51aad4e7427"
}


Example 5

The command below deletes an access key:

jfrog bt acc-keys delete key2
Bintray response: 200 OK

 

Managing Download URLs 

Command name
url-sign
Abbreviation
us
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--expiry

(Optional)
An expiry date for the URL, in Unix epoch time in milliseconds, after which the URL will be invalid. By default, expiry date will be 24 hours after being generated.

--valid-for

(Optional)
The number of seconds since generation after which the URL expires. Mutually exclusive with the --expiry option.

--callback-id

(Optional)
An applicative identifier for the request. This identifier appears in download logs and is used in email and download webhook notifications.

--callback-email

(Optional)
An email address to send mail to when a user has used the download URL. This requires a callback_id. The callback-id will be included in the mail message.

--callback-url

(Optional)
A webhook URL to call when a user has used the download URL.

--callback-method

(Optional)
The HTTP method to use for making the callback. POST is used by default. Supported methods are: GET,POSTPUT and HEAD.

  
Command arguments
 

Target path

The path to the file for which a signed URL is being provided formatted subject/repository/path

Example 

The following example assumes that the Bintray username and API key have been set using the config command.

Create a download URL for file:

Subject: my-org
Repository: swamp-repo
File: frog-file

jfrog bt us my-org/swamp-repo/frog-file
Signing URL for: my-org/swamp-repo/frog-folder/frog-file
Bintray response: 200 OK
{
  "url": "https://dl.bintray.com/my-org/swamp-repo/frog-file?expiry=1457299274396&id=xIJSNnsvOebvWlYwv0Dv8yh2WPx3xpzRvGLz4wh69F8%3D&signature=Fpcr%2B3mHz7gYjKPiD9uUSwyCLZKPfLWN5bcKVlQ2pviCUwgRWVpPT9EaJe7zvcKOd1cDyy1XzlabyoVMy4EBHA%3D%3D"
}

 

Signing a File With Your GPG Key

 

Command name
gpg-sign-file
Abbreviation
gsf
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--passphrase

(Optional)
A GPG passphrase.

  
Command arguments
 

Target path

The path to the file which is being signed, formatted subject/repository/path.

Example 

The following example assumes that the Bintray username and API key have been set using the config command.

Sign the following file:
Subject: my-org
Repository: swamp-repo
Package: frog-folder
File: frog-file

 

jfrog bt gsf my-org/swamp-repo/frog-folder/frog-file
GPG signing file: frog-file
Bintray response: 200 OK
{
  "message": "success"
}

 

Signing All Files in a Version With Your GPG Key

 

Command name
gpg-sign-version
Abbreviation
gsv
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--passphrase

(Optional)
A GPG passphrase.

  
Command arguments
 

Target path

The path to the file which is being signed, formatted subject/repository/path/version.

Example 
The following example assumes that the Bintray username and API key have been set using the config command.
Sign all files of the following version:

Subject: my-org
Repository: swamp-repo
Package: frog-folder
Version: 1.0

 

jfrog bt gsv my-org/swamp-repo/frog-package/1.0
GPG signing version: 1.0
Bintray response: 200 OK
{
  "message": "success"
}

Displaying Log Files Connected to a Package

Command name
logs
Abbreviation
l
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the second command argument (the Bintray upload path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

  
Command arguments
 

Target path

The path to the package for which you want the logs, formatted subject/repository/package.

Example  

The following example assumes that the Bintray username and API key have been set using the config command.

Retrieve logs for the following package:

Subject: my-org
Repository: swamp-repo
Package: frog-package

jfrog bt l my-org/swamp-repo/frog-package
Bintray response: 200 OK
[]

 


Downloading a Log File Connected to a Package

Command name
logs download
Abbreviation
l download
Command options

 

--user

(Optional) The Bintray username. If not set, either as a command option, or through the config command, the subject element in the command argument (the arget path) is used for authentication.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

  
Command arguments
 

Target path

The path to the package for which you want the log file, formatted subject/repository/package.

Log nameThe name of the log file to download.
Example 

The following example assumes that the Bintray username and API key have been set using the config command.

Download a log named "log1" for the following package:

Subject: my-org
Repository: swamp-repo
Package: frog-package

jfrog bt l download my-org/swamp-repo/frog-package log1
Bintray response: 200 OK
[]

Connecting to an Event Notification Stream 

This command connects to Bintray's events notification stream (Firehose Events API).

 

Command name
stream
Abbreviation
st
Command options

 

--user

(Optional) The Bintray username. If not set using the config command, then it must passed in as a command option here.

--key

(Optional)
The Bintray user’s API key. If not set using the config command, then it must passed in as a command option here.

--include

(Optional)

List of event types to include as part  of the stream, in the form of "value1;value2;...".

The types available are listed in the Bintray Firehose Events API documentation. If this option is not specified, all supported event types are included.

  
Command arguments
 

Bintray Organization

The Bintray organization for which you want to receive the event stream

Example 
 

The following example assumes that the Bintray username and API key have been set using the config command.

 

Connect to the notification stream for all events connected to the my-org Bintray organization:

 jfrog bt st my-org

 


Configuration

This command is used to configure the JFrog CLI with the default Bintray login credentials which should be used in the other commands so that you don’t have to pass them in each time. These values are defaults for each command and can be overridden per command by passing in alternative values. The values configured are saved in ~/.jfrog/bt-cli.conf.

Command name
config
Abbreviation
c
Command options

 

--userThe default user to be used for the other commands.
--key

The Bintray user’s API key.

--licensesComma-separated list of licenses that should be automatically associated with files uploaded.
For example, Apache-2.0, GPL-3.0

Uploading With Placeholders

The JFrog CLI offers enormous flexibility in how you upload files through use of wildcard expressions with placeholders in the upload command.

Any wildcard enclosed in parenthesis in the source path can be matched with a corresponding placeholder in the target path to determine the name of the artifact once uploaded.

Example

Upload all files located under dir/sub-dir with names that start with frog to the root path of repository swamp-repo under packagefroggy-package version 1.0, while adding the suffix -up to their names in Bintray.

 jfrog bt u "dir/sub-dir/(frog*)" "my-org/swamp-repo/froggy-package/1.0/{1}-up"

 



 

 

  • No labels