Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jfrog rt cp command fails on invalid URL escape #50

Closed
karangurnani opened this issue Apr 25, 2017 · 11 comments
Closed

jfrog rt cp command fails on invalid URL escape #50

karangurnani opened this issue Apr 25, 2017 · 11 comments

Comments

@karangurnani
Copy link

When trying to copy files/folders that has % symbols in their names, the copy command fails with error invalid URL escape and unsupported control scheme "".

@eyalbe4
Copy link
Contributor

eyalbe4 commented May 8, 2017

We'll check this issue @karangurnani. Thanks for letting us know.

@treed
Copy link

treed commented May 25, 2017

Probably related to this, I found a case where I am unable to upload a file with a percent in the name.

cit@linp-95-08:~$ jfrog rt upload 'test % hi' data-insights/
[Info] [Thread 2] Uploading artifact: test % bye
[Error] Put : unsupported protocol scheme ""

Removing the % doesn't have the same error.

@scottrus
Copy link

scottrus commented Nov 7, 2017

We just hit this url encoding issue downloading files that contain a # in the path. Unfortunately we are making heavy use of the jfrog CLI in our environment to download artifacts.

[srussell@artifactory]$ jfrog rt dl --threads 1 'builds-local/sm_prj-artifactory/52/sdk/c#/*' artifacts/
[Info] Searching items to download...
[Debug] Searching Artifactory using AQL query:
 items.find({"repo": "builds-local","path": {"$ne": "."},"$or": [{"$and":[{"path": {"$match": "sm_prj-artifactory/52/sdk/c#"},"name": {"$match": "*"}}]},{"$and":[{"path": {"$match": "sm_prj-artifactory/52/sdk/c#/*"},"name": {"$match": "*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property")
[Debug] Artifactory response:  200 OK
[Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/52/sdk/c#/gensrc/v1/object/NsFcSessionInitiator.cs
[Debug] [Thread 0]  Artifactory response: 404 Not Found
[Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/52/sdk/c#/gensrc/v1/object/NsReplPairListWithObjectType.cs
[Debug] [Thread 0]  Artifactory response: 404 Not Found
[Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/52/sdk/c#/gensrc/v1/object/NsShelfPortStatus.cs
[Debug] [Thread 0]  Artifactory response: 404 Not Found
[Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/52/sdk/c#/gensrc/v1/object/NsFcLinkInfo.cs
[Debug] [Thread 0]  Artifactory response: 404 Not Found
[Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/52/sdk/c#/gensrc/v1/object/Subscriber.cs
[Debug] [Thread 0]  Artifactory response: 404 Not Found
^C

@eyalbe4
Copy link
Contributor

eyalbe4 commented Nov 7, 2017

@scottrus,
We are working on a fix and planning to release it soon.
The fix should tale care of all special characters (including # and %).
We'll let you know once we release the fix.
Thanks for reporting this issue!

@scottrus
Copy link

scottrus commented Nov 7, 2017

Thank you! I found PathEscape() but do t know the code well enough to see where the url is constructed. Sorry I didn’t make a patch for this.

@eyalbe4
Copy link
Contributor

eyalbe4 commented Nov 7, 2017

No worries @scottrus!
We'll let you know once the code is committed.

@romangurevitch
Copy link
Contributor

@scottrus, @karangurnani,
Version 1.12.1 has been released and includes this fix.
We'd appreciate your feedback for it.

@scottrus
Copy link

scottrus commented Nov 9, 2017

A quick smoke test and things look great! I'll do additional testing today and tomorrow. However I don't expect any issues based on the what I'm seeing.

[srussell@ln70-srussell artifactory]$ jfrog rt dl --threads 1 'builds-local/sm_prj-artifactory/53/sdk/c#/*' artifacts/ [Info] Searching items to download... [Debug] Searching Artifactory using AQL query: items.find({"repo": "builds-local","path": {"$ne": "."},"$or": [{"$and":[{"path": {"$match": "sm_prj-artifactory/53/sdk/c#"},"name": {"$match": "*"}}]},{"$and":[{"path": {"$match": "sm_prj-artifactory/53/sdk/c#/*"},"name": {"$match": "*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","size","type","property") [Debug] Artifactory response: 200 OK [Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/53/sdk/c#/gensrc/v1/object/Stat.cs [Debug] [Thread 0] Artifactory response: 200 OK [Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/53/sdk/c#/gensrc/v1/object/NsObjectCount.cs [Debug] [Thread 0] Artifactory response: 200 OK [Info] [Thread 0] Downloading builds-local/sm_prj-artifactory/53/sdk/c#/gensrc/v1/object/NsFcSessionTarget.cs [Debug] [Thread 0] Artifactory response: 200 OK

@eyalbe4
Copy link
Contributor

eyalbe4 commented Feb 18, 2018

@scottrus and @karangurnani,
Since the fix seems to resolve the issue, I'm closing it.

@eyalbe4 eyalbe4 closed this as completed Feb 18, 2018
@solvingj
Copy link

solvingj commented Mar 20, 2018

I'm currently getting this with the following search command, but it's first time i've used jfrog cli with artifactory for search, so might be my command. Is it related or should I open new issue?

C:\Users\myuser\Downloads>jfrog rt search docker/conangcc5
[Info] Searching artifacts...
[Error] Post artifactory-test.testdomain.com/api/search/aql: unsupported protocol scheme ""
C:\Users\myuser\Downloads>jfrog rt config show artifactory-test
Server ID: artifactory-test
Url: https://artifactory-test.testdomain.com/

artifactory.version: | 5.9.1
artifactory server logs show nothing.

@solvingj
Copy link

For posterity, I had to add /artifactory to my servers URL with:

jfrog rt config --url https://artifactory-test.testdomain.com/artifactory ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants