python-harborclient
python-harborclient copied to clipboard
Harbor CLI Issues
All thoughts and suggestions are welcome.
##Issue 1: Harbor CLI
Harbor command:
harbor user-create --username test --password Testing1 --email [email protected] --realname test
CommandError: Unable to authorize user 'admin': {"reason": "Not Allowed", "message": "<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.13.10</center>
</body>
</html>
"}
harbor --debug --insecure project-list
DEBUG (connectionpool:813) Starting new HTTPS connection (1): local:443
DEBUG (connectionpool:393) https://local:443 "POST /login HTTP/1.1" 405 174
CommandError: Unable to authorize user 'admin': {"reason": "Not Allowed", "message": "<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.13.10</center>
</body>
</html>
"}
Issue 2: Native Curl Command/Outputs
curl -X GET "https://local/api/users/current" -H "accept: application/json"
Output: { Blank}
```
```
curl -X GET "https://local/api/projects?name=test&owner=admin&page=1" -H "accept: application/json"
Outputs: { null }
```
Had the same issue running harbor with an nginx ingress. Fixed by updating https://github.com/int32bit/python-harborclient/blob/master/harborclient/client.py#L268 to self.baseurl + "c//login",
Also needed to find 'beegosessionID' and replace with 'sid' running on harbor 1.7.5. At some point the cookie name for the session id has changed.
@jmakanjuola facing same issue for info initial info command to?? , How did you login using admin?
been testing harborcli on the latest version of harbor, still not working sadly :( I've tried what @stephenwolfe1 suggested without the 'c' , but still not working. I'm still having the :
CommandError: Unable to authorize user 'admin': {"reason": "Method Not Allowed", "message": "<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.15.11</center>
</body>
</html>
"}
Time: 0h:00m:03s
This client could be really useful if we could find a way to fix it properly
@stephenwolfe1 Could you upload your PR to fix this ? Thanks
This fixed my issue, REMEMBER to add "/" in the end of your goharbor URL, while defining your alias... This can help you @xinity...
@meyerbro i may have missed this tips :) let me try it soon as I'm working on a harbor implementation project :)
I'm having the same issue. Harbor core is 1.7.1 Advices?
I'm having the same issue. Harbor core is 1.7.1 Advices?
Ok.. actually the issue is with pulling. do as the README.md says: clone and build