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

add-plugin-repo does not work if specified URL contains a path value #1178

Closed
bsvihovec opened this issue Jul 7, 2017 · 2 comments
Closed
Labels

Comments

@bsvihovec
Copy link

bsvihovec commented Jul 7, 2017

Command

cf add-plugin-repo FOO https://< hostname >/cli

What occurred

Could not add repository 'FOO' from https://< hostname >/cli: HTTP Response: 404 Not Found
HTTP Response Body: {"message":"","statusCode":404}
FAILED

What you expected to occur

The plugin repository should have been added correctly. (Insert a valid hostname for your plugin repository)

CLI Version

cf version 6.28.0+9e024bdbd.2017-06-27

CF Trace

REQUEST: [2017-07-07T14:44:33-04:00]
GET /list HTTP/1.1
Host: < hostname >
Accept: application/json
Content-Type: application/json
User-Agent: cf/6.28.0+9e024bdbd.2017-06-27 (go1.8.3; amd64 darwin)

RESPONSE: [2017-07-07T14:44:33-04:00]
HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Type: application/json
Date: Fri, 07 Jul 2017 18:44:33 GMT
Strict-Transport-Security: max-age=31536000
X-Backside-Transport: FAIL FAIL
X-Frame-Options: SAMEORIGIN
X-Global-Transaction-Id: 2096987929
{
"message": "",
"statusCode": 404
}

Platform & Shell Details

Mac OS X 10.12.4 iTerm

Any other relevant information

It looks like the command is removing the path (i.e. /cli) from the specified repository and then appending '/list' to the hostname. This results in a 404 because https://< hostname >/cli/list exists, but https://< hostname >/list does not.

I believe I confirmed this by changing the protocol to 'http1s://' which results in the following being printed by cli/cf/commands/pluginrepo/add_plugin_repo.go :: verifyURL

Could not add repository 'FOO' from http1s://< hostname >/cli: Get http1s://< hostname >/list: unsupported protocol scheme "http1s"

This same command works in version 6.26

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/148505867

The labels on this github issue will be updated when the story is started.

@dkoper
Copy link

dkoper commented Jul 26, 2017

Addressed in cf CLI 6.29.0. Thanks again for reporting it.

Cheers,
Dies Koper
CF CLI PM

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

No branches or pull requests

3 participants