首页 > 其他分享 >JFrog CLI 客户端的使用

JFrog CLI 客户端的使用

时间:2023-08-16 19:33:46浏览次数:33  
标签:JFrog CLI jfrog -- 192 config Generate 客户端

概述

JFrog CLI 是一个智能的命令行客户端工具,它提供了一个简单的交互界面,可以自动访问JFrog仓库,简化指令脚本,便于操作维护,使用更加高效和可靠。

JFrog CLI 客户端的使用_ci


官方介绍

https://jfrog.com/help/r/jfrog-cli/about-jfrog-cli

JFrog CLI 客户端的使用_bundle_02


系统平台

CentOS Linux 7

JFrog CLI 客户端的使用_客户端_03


下载工具

官方下载链接 : https://jfrog.com/getcli/

JFrog CLI 客户端的使用_bundle_04

按你系统需求,按你习惯下载对应的工具即可。

也分享个 GitHub 上的仓库链接

链接如下 : https://github.com/jfrog/jfrog-cli

JFrog CLI 客户端的使用_ci_05


安装配置

我用的上面 GitHub 仓库的代码,下载到本地后,进入 installcli 目录后,按下面的方式执行。

JFrog CLI 客户端的使用_ci_06

[root@192 installcli]# ./jfrog.sh
Downloading the latest version of JFrog CLI...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 25.4M  100 25.4M    0     0  2642k      0  0:00:09  0:00:09 --:--:-- 3673k

The jfrog executable was installed in /usr/local/bin
[root@192 installcli]# 
[root@192 installcli]# jfrog --version
jf version 2.45.0
[root@192 installcli]#

在下载安装的时候,需要 root 账户,下载完成后,自动就 copy 到 /usr/local/bin 目录下了,执行版本查看,能正常显示版本,就说明客户端工具,就安装完成了,就这么简单。


配置环境


JFrog CLI 客户端的使用_客户端_07

# 主要是如下的几个配置项,按实践需求配置即可。
1、服务器ID
2、服务器URL
3、用户名
4、用户密码 或者 API Key

[scm@192 ~]$
[scm@192 ~]$ jfrog rt ping
To avoid this message in the future, set the CI environment variable to true.
The CLI commands require the URL and authentication details
Configuring JFrog CLI with these parameters now will save you having to include them as command options.
You can also configure these parameters later using the 'jfrog c' command.
Configure now? (y/n) [n]? y
Choose a server ID: jfdev
JFrog Platform URL: http://192.168.59.148:18081/
JFrog username: admin
JFrog password or API key:
Is the Artifactory reverse proxy configured to accept a client certificate? (y/n) [n]?
Your JFrog URL uses an insecure HTTP connection, instead of HTTPS. Are you sure you want to continue? (y/n) [n]? y
OK
[scm@192 ~]$ jfrog rt ping
OK
[scm@192 ~]$ jfrog c show
Server ID:                      jfdev
JFrog Platform URL:             http://192.168.59.148:18081/
Artifactory URL:                http://192.168.59.148:18081/artifactory/
Distribution URL:               http://192.168.59.148:18081/distribution/
Xray URL:                       http://192.168.59.148:18081/xray/
Mission Control URL:            http://192.168.59.148:18081/mc/
Pipelines URL:                  http://192.168.59.148:18081/pipelines/
User:                           admin
Password:                       ***
Access token:                   *** (Subject: 'jfrt@01f2rs2gwna0m50wffq8ba1vna/users/admin')
Default:                        true

[scm@192 ~]$
[scm@192 ~]$

客户端工具环境配置完成后,就可以使用客户端工具了。

如下示例展示客户端工具的使用

JFrog CLI 客户端的使用_bundle_08


登录 jfrog 系统,查看刚才上传的制品包。

JFrog CLI 客户端的使用_客户端_09

可以看到,使用 JFrog CLI 客户端工具,已顺利上传了制品包。

JFrog CLI 还有非常多非常强大的功能,需要的同学可以在官网查看学习使用,也可以查看帮助学习。

[scm@192 target]$ jfrog --help
NAME:
   jfrog - See https://github.com/jfrog/jfrog-cli for usage instructions.

USAGE:
   jfrog [global options] command [command options] [arguments...]

VERSION:
   2.45.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

   Audit & Scan:
     audit, aud          Audit your local project's dependencies by generating a dependency tree and scanning it with Xray.
     build-scan, bs      Scan a published build-info with Xray.
     curation-audit, ca  Audit your project dependencies for their curation status.
     scan, s             Scan files located on the local file-system with Xray.

   Build Tools:
     docker                  Run any docker command, including ‘jf docker scan’ for scanning a local image with Xray.
     dotnet                  Run .NET Core CLI.
     dotnet-config, dotnetc  Generate dotnet configuration.
     go, go                  Runs go.
     go-config, goc          Generate go build configuration.
     go-publish, gp          Publish go package and/or its dependencies to Artifactory.
     gradle                  Run Gradle build.
     gradle-config, gradlec  Generate gradle build configuration.
     mvn                     Run Maven build.
     mvn-config, mvnc        Generate maven build configuration.
     npm                     Run npm command.
     npm-config, npmc        Generate npm configuration.
     nuget                   Run NuGet.
     nuget-config, nugetc    Generate nuget configuration.
     pip                     Run pip install.
     pip-config, pipc        Generate pip build configuration.
     pipenv                  Run pipenv install.
     pipenv-config, pipec    Generate pipenv build configuration.
     poetry                  Run poetry command
     poetry-config, poc      Generate poetry build configuration.
     terraform, tf           Runs terraform
     terraform-config, tfc   Generate terraform configuration.
     yarn                    Run Yarn commands.
     yarn-config, yarnc      Generate Yarn configuration.

   Lifecycle:
     release-bundle-create, rbc   Create a release bundle from builds or from existing release bundles
     release-bundle-promote, rbp  Promote a release bundle

   Other:
     rt          Artifactory commands.
     mc          Mission Control commands.
     xr          Xray commands.
     ds          Distribution commands.
     pl          JFrog Pipelines commands.
     completion  Generate autocomplete scripts.
     plugin      Plugins handling commands.
     config, c   Config commands.
     project     Project commands.
     ci-setup    Set up a CI pipeline with the JFrog Platform.
     options     Show all supported environment variables.

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version


[scm@192 target]$

至此,JFrog CLI 客户端的使用就介绍到这,希望对各位有所帮助,也希望看过的同学,动动你发财的手,点个小红心点个赞。

标签:JFrog,CLI,jfrog,--,192,config,Generate,客户端
From: https://blog.51cto.com/wst021sh/7112598

相关文章

  • vue-cli项目搭建的详细过程
    vue-cli官方文档:https://cli.vuejs.org/zh/guide/安装vue-cli,前提:需要安装node和npm新建vue项目的过程:1、全局安装vue-cli npminstall-g@vue-cli  2、在项目放置目录下,创建项目 vuecreatemy-app  (my-app为项目名称,注意不要使用驼峰命名)3、打开项目,......
  • 在core项目下通过Dapper对mysql执行批量操作 报at MySql.Data.MySqlClient.MySqlComma
     在core项目下通过Dapper对mysql执行批量操作一直报异常  报PushService=>UpdateKeyWordProductCountTask=>错误信息:Fatalerrorencounteredduringcommandexecution.;;;堆栈信息:atMySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehaviorbehavior)at......
  • 开源XL-LightHouse与Flink、ClickHouse之类技术相比有什么优势
    Flink是一款非常优秀的流式计算框架,而ClickHouse是一款非常优秀的OLAP类引擎,它们是各自所处领域的佼佼者,这一点是毋庸置疑的。Flink除了各种流式计算场景外也必然可以用于流式统计,ClickHouse同样也可以用于流式统计,但我不认为它们是优秀的流式统计工具。XL-Lighthouse在流式统计这......
  • 模拟修改客户端访问服务器时的IP方法
    产品需求有时候需要区分白名单城市和非白名单城市,例如:北上广深访问页面A,返回一套数据B,其他城市访问页面A,返回另一套数据C。这时候我们就需要通过一定的方法才能测试覆盖到这个场景。两个方法:1、使用第三方网络代理,代理到其他城市的网络环境(这里就不细说了,缺点就是网速不稳定,可......
  • 仿@FeignClient实现使用Http请求外部服务
    因为某些原因,原本注册在同一个nacos里的部分微服务需要拆分出去,而拆分出去的那部分服务调用方式需要修改。所以为了简单省事,加个了@HttpClient注解用来替换@FeignClient。三步走:  1、@HttpClient注解  2、扫描被@HttpClient注解的接口  3、为扫描到的接口创建代理类@Ht......
  • MSP 客户端打开指定外部程序
    functionshowMedi(){if(typeofwindow.cefSharpExample!="undefined"){varpath="D:\\WebApp.exe",window.cefSharpExample.showExe(path)}else{alert("可能无权限,请用客户端程序操作!");}}......
  • EAS_客户端设置按钮和菜单栏操作选项隐藏
    我们要想隐藏客户端的按钮或者菜单,防止操作,可以在listUI或者EditUI中onload()方法中使用下列方式来设置控件是否显示和是否可用,控件名可通过dep查看或者通过shift+alt+d来查看控件publicvoidonload(){//禁用按钮this.btnSave.setVisible(false);......
  • Linux:nmcli指令
    学习自:Linux中的nmcli命令-知乎 nmcli是NetworkManager提供的命令,使用时要确保NetworkManager服务处于启用状态。nmcli有四类常用命令:n(networking)、g(general)、c(connection)、d(device)根据Linux的指令前缀写法,以上所有指令都可写作部分前缀,例如connection就可以从c、co、c......
  • CLIP: Learning Transferable Visual Models From Natural Language Supervision
    CLIP:LearningTransferableVisualModelsFromNaturalLanguageSupervision论文链接:https://arxiv.org/pdf/2103.00020.pdf代码链接:https://github.com/openai/CLIPblog链接:https://openai.com/research/clipCLIP的英文全称是ContrastiveLanguage-ImagePre-trainin......
  • CyclicBarrier和CountDownLatch的区别
    引言在并发编程中,CyclicBarrier和CountDownLatch是两个常用的同步工具类。它们都可以用于线程之间的等待和协调,但在使用方式和功能上有一些区别。本文将深入探讨CyclicBarrier和CountDownLatch的区别,并给出相应的代码示例。CyclicBarrier和CountDownLatch简介CyclicBarrierCycl......