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

I can't log in to harbor (search working) - Harbor Version v1.7.1-c3806525 #42

Open
rurus9 opened this issue Jan 23, 2019 · 3 comments
Open

Comments

@rurus9
Copy link

rurus9 commented Jan 23, 2019

Harbor Version v1.7.1-c3806525

cat conf/.harborctl.yaml

# harborctl configuration file (located at conf/ by default)
scheme: https
# specify harbor endpoint address
address: my.harbor.server

harborctl search -q=mariadb

==> GET https://my.harbor.server/api/search?q=mariadb
<== 
<== Rsp Status: 200 OK
<== Rsp Body: {
  "project": [],
  "repository": [
    {
      "project_id": 6,
      "project_name": "user",
      "project_public": true,
      "pull_count": 1,
      "repository_name": "user/mariadb",
      "tags_count": 1
    }
  ],
  "Chart": []
}

./harborctl login -u USER

Password: 
==> POST https://my.harbor.servel/login
<== Cookies: []
target cookies are not available

./harborctl systeminfo volume

==> GET https://harbor.abs.assecobs.pl/api/systeminfo/volumes
<== 
<== Rsp Status: 401 Unauthorized
<== Rsp Body: 

I've got harborctl from repo (go get -u github.com/moooofly/harborctl) today (2019-01-23) about 10am

@moooofly
Copy link
Owner

Hi, @rurus9

Sorry for late reply, I will check this up.

It is more likely related to harbore version issue, because harbor changes dramatically between lastest release.

BTW, harborctl has been developed based on v1.6.0-66709daa

@moooofly
Copy link
Owner

Hi, @rurus9

After some digging, the conclusion as follow:

  • The login API changed from "/login" into "/c/login"
  • Some APIs that originally can be used without cookie setting, now must set
  • Use "beegonsessionID" before, use "sid" now

I will create a branch to trace v1.7.0, you can get the codes from there to use.

@rurus9
Copy link
Author

rurus9 commented Jan 31, 2019

OK, I am waiting for news ;)

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

No branches or pull requests

2 participants