通过curl

时间:2018-03-19 06:12:02

标签: api artifactory

我没有太多运气将从本地人工制品服务器导出的分支(ext-snapshot-local)导入到云神器仓库(凭据可以并且可以创建虚拟文件)并且我找到了在线API doco有点不足。

JFrog提到'...如果我们为导出指定的路径是“/ Users / name”,我们将curl命令的“path”部分指定为“path = / Users / name / repositories / “因为导出文件夹默认名为”存储库“。 (这对我来说不是100%清楚,因为它们似乎指定了默认值......)

无论如何,我试过了:

curl -u $MY_UID:$MY_PWD -X POST "https://organisation.jfrog.io/organisation/api/import/repositories?path=/home/user/src/artifactory/repositories&verbose=1"

仅接收

Starting Repositories Import of All repositories from /home/user/src/artifactory/repositories

400 : Directory /home/user/src/artifactory/repositories does not exist.

500 : No directory for repository ext-release-local found at /home/user/src/artifactory/repositories

500 : No directory for repository ext-snapshot-local found at /home/user/src/artifactory/repositories

500 : No directory for repository libs-release-local found at /home/user/src/artifactory/repositories

500 : No directory for repository libs-snapshot-local found at /home/user/src/artifactory/repositories

500 : No directory for repository jcenter-cache found at /home/user/src/artifactory/repositories

500 : Error occurred during import: null
java.lang.NullPointerException
  at java.util.Objects.requireNonNull(Objects.java:203)
  at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
  at java.util.Arrays.asList(Arrays.java:3800)
  at org.artifactory.repo.service.ImportJob.collectSubdirectoriesNames(ImportJob.java:237)
  at org.artifactory.repo.service.ImportJob.checkForUnusedSubdirectories(ImportJob.java:219)
  at org.artifactory.repo.service.ImportJob.onExecute(ImportJob.java:128)
  at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:48)
  at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
  at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:30)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)

在以下情况下找不到存储库(分支),

/home/user/src/artifactory/repositories/ext-snapshot-local

0 个答案:

没有答案