#1.上传tar包,并且创建包名对应路径存放
jfrog rt u "(*).tar.gz" my-lical-repo/{1}/--recursive=false
#2.上传匹配文件,并按照规则重新命名.如下: 匹配文件上传后重命名为frog.targ.z-01
jfrog rt u "frog*" my-lical-repo/frogfiles/{1}-01--recursive=false
#3.按照文件类型进行分类存放,
jfrog rt u "(*).(*)" my-local-repo/{2}/{1}.{2}--recursive=false
#4.不同仓库 进行复制
jfrog rt u cp "my-local-repo1/mysql/(*.rpm)" my-local-repo2/mysql/mysql/(1).cp
**上传文件 upload:**
#1.上传单个文件,上传至指定仓库
jfrog rt u froggy.tgz my-local-repo
#2. 保留原有文件名字,上传至仓库指定路径
jfrog rt u "build/*.zip" my-local-repo/zipFiles/
#3. 还要删除zipFiles文件夹下my-local-repo存储库中的所有文件,除了通过此命令上传的文件之外。
jfrog rt u "build/*.zip" my-local-repo/zipFiles/--sync-deletes="my-local-repo/zipFiles/"
#4.排除(不要上传)文件,通配符模式:将 **install** 作为路径一部分,并具有 **pack** 扩展名
jfrog rt u "build/" my-release-local/files/--exclusions="*install*pack*"
#5.排除(不要上传)文件,正则表达式:将 **install** 作为路径一部分,并具有 **pack** 扩展名
jfrog rt u "build/" my-release-local/files/--regexp --exclusions="(.*)install.*pack$"
#6.遍历上传本地文件
jfrog rt u "test/" tools/test --flat=false**下载文件 download **
#1.下载远程仓库下指定文件: cool-froggy.zip
jfrog rt dl my-local-repo/cool-froggy.zip
#2.下载指定文件夹下所有工件
jfrog rt dl my-local-repo/all-my-frogs/ all-my-frogs/
#3.下载匹配的文件
jfrog rt dl "my-local-repo/*.jar" all-my-frogs/
#4.下载上传到my-local-repo存储库中的all-my-frog文件夹的最新文件。
jfrog rt dl "my-local-repo/all-my-frogs/"--sort-by=created --sort-order=desc --limit=1**拷贝文件 cp :**
#1.不同仓库之间拷贝
jfrog rt cp source-frog-repo/rabbit/ target-frog-repo/rabbit/
#2.仓库之间,拷贝匹配的文件
jfrog rt cp "source-frog-repo/rabbit/*.zip" target-frog-repo/rabbit/
#3.拷贝属性为“Version=1.0"的所有工件
jfrog rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/--props=Version=1.0**移动文件 mv :**
jfrog rt mv source-frog-repo/rabbit/ target-frog-repo/rabbit/
jfrog rt mv "source-frog-repo/rabbit/*.zip" target-frog-repo/rabbit/
jfrog rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/--props=Version=1.0**删除文件 delete :**
jfrog rt del frog-repo/rabbit/
jfrog rt del "frog-repo/rabbit/*.zip"**搜索文件 search :**
jfrog rt s frog-repo/rabbit/
jfrog rt s "frog-repo/rabbit/*.zip"
# Display a list of the files under example-repo-local with the following fields: path, actual_md5, modified_b, updated and depth.
jfrog rt s example-repo-local --include="actual_md5;modified_by;updated;depth"
2. 用户登录信息配置
#1. 交互式创建服务器配置唯一 ID
jfrog rt c rt-server-1----依次交互式输入配置信息
JFrog Artifactory URL [http://127.0.0.1:8081/artifactory/]:
JFrog Distribution URL (Optional):
Access token (Leave blank for username and password/API key):
User [admin]:
Password/API key:
Is the Artifactory reverse proxy configured to accept a client certificate?(y/n):
You have newmailin/var/spool/mail/root
#2.创建配置信息,配置信息存放位置: `/root/.jfrog/jfrog-cli.conf`
# 用户密码方式
jfrog rt c rt-server-1--url=http://127.0.0.1:8081/artifactory --user=admin --password=password
# apikey方式
jfrog rt c rt-server-1--url=http://127.0.0.1:8081/artifactory --apikey=APIKEY
#3.查看配置
jfrog ft -c show
# 查看指定server配置
jfrog rt c show rt-server-1
#4.测试配置
jfrog rt ping
jfrog rt ping --server-id=rt-server-1
jfrog rt ping --url=http://127.0.0.1:8081/artifactory/
#5.删除配置
jfrog ft -c delete rt-server-1
#6.清除配置信息
jfrog rt c clear
jfrog rt config --user=admin --password=admin --url=http://127.0.0.1:8081/artifactory --interactive=false
3. 文件属性设置
#1.设置文件属性,kv形式
jfrog rt sp "generic-local/*.zip""a=1;b=2,3"
#2.在通过文件规范 `my-spec` 找到的文件中设置属性:a=1;b=2,3
jfrog rt sp "a=1;b=2,3"--spec my-spec
#3.删除文件属性:
#Delete the "status" and "phase" properties from all the zip files in the generic-local repository.
jfrog rt delp "generic-local/*.zip""status,phase"