{"id":34100390,"url":"https://github.com/int32bit/python-harborclient","last_synced_at":"2025-12-14T16:57:51.572Z","repository":{"id":57457076,"uuid":"67782571","full_name":"int32bit/python-harborclient","owner":"int32bit","description":"A CLI tool for the Docker Registry Harbor","archived":false,"fork":false,"pushed_at":"2019-06-01T06:23:21.000Z","size":103,"stargazers_count":107,"open_issues_count":17,"forks_count":30,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-20T20:41:18.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/int32bit/harborclient","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int32bit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-09T08:47:47.000Z","updated_at":"2025-06-20T01:47:49.000Z","dependencies_parsed_at":"2022-09-15T13:01:33.215Z","dependency_job_id":null,"html_url":"https://github.com/int32bit/python-harborclient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/int32bit/python-harborclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int32bit%2Fpython-harborclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int32bit%2Fpython-harborclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int32bit%2Fpython-harborclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int32bit%2Fpython-harborclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int32bit","download_url":"https://codeload.github.com/int32bit/python-harborclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int32bit%2Fpython-harborclient/sbom","scorecard":{"id":490162,"data":{"date":"2025-08-11","repo":{"name":"github.com/int32bit/python-harborclient","commit":"09c936279323cbea276299d2a8188c264d9bbe2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/25 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:2 to python:2@sha256:cfa62318c459b1fde9e0841c619906d15ada5910d625176e24bf692cf8a2601d","Warn: pipCommand not pinned by hash: Dockerfile:5","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-258 / GHSA-wmqq-r32m-87c5","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: GHSA-9772-cwx9-r4cj"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T18:54:52.493Z","repository_id":57457076,"created_at":"2025-08-19T18:54:52.493Z","updated_at":"2025-08-19T18:54:52.493Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27731974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-14T16:57:50.836Z","updated_at":"2025-12-14T16:57:51.562Z","avatar_url":"https://github.com/int32bit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[中文](./README.zh.md)\n\n## About This Project\n\nProject Harbor is an enterprise-class registry server that stores and distributes Docker images. Harbor extends the open source Docker Distribution by adding the functionalities usually required by an enterprise, such as security, identity and management. As an enterprise private registry, Harbor offers better performance and security. Having a registry closer to the build and run environment improves the image transfer efficiency. Harbor supports the setup of multiple registries and has images replicated between them. With Harbor, the images are stored within the private registry, keeping the bits and intellectual properties behind the company firewall. In addition, Harbor offers advanced security features, such as user management, access control and activity auditing.\n\nThis project provides a great native command-line experience for managing Harbor resources like user, project, etc. It can be used on macOS, Linux, and Docker.\n\n## Install Harbor CLI\n\nHarbor CLI can be installed by one of two approaches:\n\n* Option 1: Build as a Docker image(easy, recommended)\n* Option 2: Native Installation from Source\n* Option 3: Install from pypi\n\n### Option 1: Build as a Docker image(easy, recommended)\n\nWe maintain a Docker prebuilt image with Harbor CLI. Install the CLI using `docker run`.\n\n```\ndocker run -t -i krystism/harborclient harbor help\n```\n\nWe strongly suggest you build image from code manually, because our prebuilt image may be not latest version.\n\n```\ndocker build -t yourname/harborclient .\n```\n\nRun Harbor CLI as follows:\n\n```\n$ docker run --rm \\\n -e HARBOR_USERNAME=\"admin\" \\\n -e HARBOR_PASSWORD=\"Harbor12345\" \\\n -e HARBOR_PROJECT=1 \\\n -e HARBOR_URL=\"http://localhost\" \\\n yourname/harborclient harbor info\n\n+------------------------------+---------------------+\n| Property                     | Value               |\n+------------------------------+---------------------+\n| admiral_endpoint             | NA                  |\n| auth_mode                    | db_auth             |\n| disk_free                    | 4993355776          |\n| disk_total                   | 18381979648         |\n| harbor_version               | v1.2.2              |\n| has_ca_root                  | False               |\n| next_scan_all                | 0                   |\n| project_creation_restriction | everyone            |\n| registry_url                 | localhost           |\n| self_registration            | True                |\n| with_admiral                 | False               |\n| with_clair                   | False               |\n| with_notary                  | False               |\n+------------------------------+---------------------+\n```\n\nCreate an alias:\n\n```bash\nalias harbor='docker run \\\n -e HARBOR_USERNAME=\"admin\" \\\n -e HARBOR_PASSWORD=\"Harbor12345\" \\\n -e HARBOR_PROJECT=1 \\\n -e HARBOR_URL=\"http://localhost\" \\\n --rm krystism/harborclient harbor'\n```\n\nThen you can run Harbor CLI like:\n\n```\n$ harbor user-list\n+---------+----------+----------+----------------------+--------------+-------------+\n| user_id | username | is_admin |        email         |   realname   |   comment   |\n+---------+----------+----------+----------------------+--------------+-------------+\n|    1    |  admin   |    1     |  admin@example.com   | system admin |  admin user |\n|    2    | int32bit |    0     | int32bit@example.com |   int32bit   |  int32bit   |\n+---------+----------+----------+----------------------+--------------+-------------+\n```\n\n### Option 2: Native Installation from Source\n\nThe installation steps boil down to the following:\n\n#### Install requirements\n\n```\nsudo pip install -r requirements.txt\n```\n\n#### Install Harbor CLI.\n\n```sh\nsudo python setup.py install\n```\n\nOr\n\n```sh\nsudo pip install .\n```\n\n### Option 3: Install from pypi\n\n```\nsudo pip install python-harborclient\n```\n\n### Verify operation\n\nAs the `admin` user, do a `info` request:\n\n```\n$ harbor --os-baseurl https://localhost --os-username admin --os-project 1 info\npassword: *****\n+------------------------------+---------------------+\n| Property                     | Value               |\n+------------------------------+---------------------+\n| admiral_endpoint             | NA                  |\n| auth_mode                    | db_auth             |\n| disk_free                    | 4992696320          |\n| disk_total                   | 18381979648         |\n| harbor_version               | v1.2.2              |\n| has_ca_root                  | False               |\n| next_scan_all                | 0                   |\n| project_creation_restriction | everyone            |\n| registry_url                 | localhost           |\n| self_registration            | True                |\n| with_admiral                 | False               |\n| with_clair                   | False               |\n| with_notary                  | False               |\n+------------------------------+---------------------+\n```\n\n### Create harbor client environment scripts\n\nTo increase efficiency of client operations, Harbor CLI supports simple client environment scrips also known as `harborrc` file.\nThese scripts typically contain common options for all client, but also support unique options.\n\nCreate client environment scripts for `admin` user:\n\n```sh\ncat \u003eadmin-harborrc \u003c\u003cEOF\nexport HARBOR_USERNAME=admin\nexport HARBOR_PASSWORD=Harbor12345\nexport HARBOR_URL=http://localhost\nexport HARBOR_PROJECT=1\nEOF\n```\n\nReplace `HARBOR_PASSWORD` with your password.\n\nTo run clients as a specific project and user, you can simply load the associated client environment script prior to running them.\n\n```bash\nsource admin-harborrc\n```\n\nList images:\n\n```\n$ harbor list\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n|          name         | project_id |    size   | tags_count | star_count | pull_count |     update_time      |\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n|    int32bit/busybox   |     2      |   715181  |     1      |     0      |     0      | 2017-11-01T07:06:36Z |\n| int32bit/golang:1.7.3 |     2      | 257883053 |     2      |     0      |     0      | 2017-11-01T12:59:05Z |\n|  int32bit/hello-world |     2      |    974    |     1      |     0      |     0      | 2017-11-01T13:22:46Z |\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n```\n\n### Setup bash completion\n\n```\n$ complete -W $(harbor bash-completion) harbor\n$ harbor us\u003ctab\u003e\u003ctab\u003e\nusage user-create user-delete user-list user-show  user-update\n```\n\n## User Guide\n\nThis guide walks you through the fundamentals of using Harbor CLI. You'll learn how to use Harbor CLI to:\n\n* Manage your projects.\n* Manage members of a project.\n* Search projects and repositories.\n* Manage users.\n* Manage replication policies.\n* Manage configuration.\n* Delete repositories and images.\n* Show logs.\n* Get statistics data.\n* ...\n\nOnce you install Harbor CLI, you can run `harbor help` to get usage:\n\n```\n$ harbor help\nusage: harbor [--debug] [--timings] [--version] [--os-username \u003cusername\u003e]\n              [--os-password \u003cpassword\u003e] [--os-project \u003cproject\u003e]\n              [--timeout \u003ctimeout\u003e] [--os-baseurl \u003cbaseurl\u003e] [--insecure]\n              [--os-cacert \u003cca-certificate\u003e] [--os-api-version \u003capi-version\u003e]\n              \u003csubcommand\u003e ...\n```\n\nRun \"harbor help COMMAND\" for help on a specific command.\n\n```\n$ harbor help user-create\nusage: harbor user-create --username \u003cusername\u003e --password \u003cpassword\u003e --email\n                          \u003cemail\u003e [--realname \u003crealname\u003e]\n                          [--comment \u003ccomment\u003e]\n\nCreate a new User.\n\nOptional arguments:\n  --username \u003cusername\u003e  Unique name of the new user.\n  --password \u003cpassword\u003e  Password of the new user.\n  --email \u003cemail\u003e        Email of the new user.\n  --realname \u003crealname\u003e  Realname of the new user.\n  --comment \u003ccomment\u003e    Comment of the new user.\n```\n\nShow details about API requests using `--debug` option:\n\n```\n$ harbor  --debug --insecure project-list\nDEBUG (connectionpool:824) Starting new HTTPS connection (1): devstack\nDEBUG (connectionpool:396) https://devstack:443 \"POST /login HTTP/1.1\" 200 0\nDEBUG (client:274) Successfully login, session id: 2642a18db2cb0fb207bd721899da9f8b\nREQ: curl -g -i --insecure 'https://devstack/api/projects' -X GET -H \"Accept: application/json\" -H \"Harbor-API-Version: v2\" -H \"User-Agent: python-harborclient\" -b \"beegosessionID: 2642a18db2cb0fb207bd721899da9f8b\"\nDEBUG (connectionpool:824) Starting new HTTPS connection (1): devstack\nDEBUG (connectionpool:396) https://devstack:443 \"GET /api/projects HTTP/1.1\" 200 316\nRESP: [200] {'Content-Length': '316', 'Content-Encoding': 'gzip', 'X-Total-Count': '2', 'Server': 'nginx/1.11.13', 'Connection': 'keep-alive', 'Date': 'Mon, 06 Nov 2017 12:24:53 GMT', 'Content-Type': 'application/json; charset=utf-8'}\nRESP BODY: [{\"creation_time_str\": \"\", \"enable_content_trust\": false, \"Togglable\": true, \"owner_name\": \"\", \"name\": \"int32bit\", \"deleted\": 0, \"repo_count\": 3, \"creation_time\": \"2017-11-01T06:56:07Z\", \"update_time\": \"2017-11-01T06:56:07Z\", \"prevent_vulnerable_images_from_running\": false, \"current_user_role_id\": 1, \"project_id\": 2, \"automatically_scan_images_on_push\": false, \"public\": 1, \"prevent_vulnerable_images_from_running_severity\": \"\", \"owner_id\": 1}, {\"creation_time_str\": \"\", \"enable_content_trust\": false, \"Togglable\": true, \"owner_name\": \"\", \"name\": \"library\", \"deleted\": 0, \"repo_count\": 0, \"creation_time\": \"2017-11-01T06:08:43Z\", \"update_time\": \"2017-11-01T06:08:43Z\", \"prevent_vulnerable_images_from_running\": false, \"current_user_role_id\": 1, \"project_id\": 1, \"automatically_scan_images_on_push\": false, \"public\": 1, \"prevent_vulnerable_images_from_running_severity\": \"\", \"owner_id\": 1}]\n\n+------------+----------+----------+----------------------+------------+----------------------+--------+\n| project_id |   name   | owner_id | current_user_role_id | repo_count |    creation_time     | public |\n+------------+----------+----------+----------------------+------------+----------------------+--------+\n|     1      | library  |    1     |          1           |     0      | 2017-11-01T06:08:43Z |   1    |\n|     2      | int32bit |    1     |          1           |     3      | 2017-11-01T06:56:07Z |   1    |\n+------------+----------+----------+----------------------+------------+----------------------+--------+\n```\n\nPrint call timing info with `--timings` option:\n\n```\n$ harbor  --insecure --timings user-list\n+---------+----------+----------+----------------------+--------------+-------------+\n| user_id | username | is_admin |        email         |   realname   |   comment   |\n+---------+----------+----------+----------------------+--------------+-------------+\n|    1    |  admin   |    1     |  admin@example.com   | system admin |  admin user |\n|    3    | int32bit |    0     | int32bit@example.com |   int32bit   |     test    |\n+---------+----------+----------+----------------------+--------------+-------------+\n+--------------+-----------------+\n| url          | seconds         |\n+--------------+-----------------+\n| GET /users   | 0.0146510601044 |\n| GET /users/1 | 0.0146780014038 |\n| Total        | 0.0293290615082 |\n+--------------+-----------------+\nTotal: 0.0293290615082 seconds\n```\n\nAll SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered \"insecure\" fail unless `--insecure` is used.\n\n```\n$ harbor info\nTraceback (most recent call last):\n  File \"/usr/local/bin/harbor\", line 10, in \u003cmodule\u003e\n    sys.exit(main())\n  File \"/usr/local/lib/python2.7/dist-packages/harborclient/shell.py\", line 404, in main\n    HarborShell().main(argv)\n  File \"/usr/local/lib/python2.7/dist-packages/harborclient/shell.py\", line 330, in main\n    self.cs.authenticate()\n  File \"/usr/local/lib/python2.7/dist-packages/harborclient/v2/client.py\", line 83, in authenticate\n    self.client.authenticate()\n  File \"/usr/local/lib/python2.7/dist-packages/harborclient/client.py\", line 270, in authenticate\n    verify=self.verify_cert)\n  File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 112, in post\n    return request('post', url, data=data, json=json, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/requests/api.py\", line 58, in request\n    return session.request(method=method, url=url, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 508, in request\n    resp = self.send(prep, **send_kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/requests/sessions.py\", line 618, in send\n    r = adapter.send(request, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/requests/adapters.py\", line 506, in send\n    raise SSLError(e, request=request)\nrequests.exceptions.SSLError: HTTPSConnectionPool(host='devstack', port=443): Max retries exceeded with url: /login (Caused by SSLError(SSLError(\"bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)\",),))\n$ harbor --insecure info\n+------------------------------+---------------------+\n| Property                     | Value               |\n+------------------------------+---------------------+\n| admiral_endpoint             | NA                  |\n| auth_mode                    | db_auth             |\n| disk_free                    | 4991021056          |\n| disk_total                   | 18381979648         |\n| harbor_version               | v1.2.2              |\n| has_ca_root                  | False               |\n| next_scan_all                | 0                   |\n| project_creation_restriction | everyone            |\n| registry_url                 | 192.168.99.101:8888 |\n| self_registration            | True                |\n| with_admiral                 | False               |\n| with_clair                   | False               |\n| with_notary                  | False               |\n+------------------------------+---------------------+\n```\n\n## Examples\n\n### Create a new user\n\n```\n$ harbor --insecure user-create \\\n --username new-user \\\n --password 1q2w3e4r \\\n --email new_user@example.com \\\n --realname newuser \\\n --comment \"I am a new user\"\nCreate user 'new-user' successfully.\n```\n\n### Delete a user\n\n```\n$ harbor --insecure user-delete new-user\nDelete user 'new-user' sucessfully.\n```\n\n### List repositories and images\n\n```\n$ harbor  list\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n|          name         | project_id |    size   | tags_count | star_count | pull_count |     update_time      |\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n|    int32bit/busybox   |     2      |   715181  |     1      |     0      |     0      | 2017-11-01T07:06:36Z |\n| int32bit/golang:1.7.3 |     2      | 257883053 |     2      |     0      |     0      | 2017-11-01T12:59:05Z |\n|  int32bit/hello-world |     2      |    974    |     1      |     0      |     0      | 2017-11-01T13:22:46Z |\n+-----------------------+------------+-----------+------------+------------+------------+----------------------+\n```\n\n### Show details about image\n\n```\n$ harbor show int32bit/golang:1.7.3\n+--------------------+-------------------------------------------------------------------------+\n| Property           | Value                                                                   |\n+--------------------+-------------------------------------------------------------------------+\n| creation_time      | 2017-11-01T12:59:05Z                                                    |\n| description        |                                                                         |\n| id                 | 2                                                                       |\n| name               | int32bit/golang                                                         |\n| project_id         | 2                                                                       |\n| pull_count         | 0                                                                       |\n| star_count         | 0                                                                       |\n| tag_architecture   | amd64                                                                   |\n| tag_author         |                                                                         |\n| tag_created        | 2016-11-08T19:32:39.908048617Z                                          |\n| tag_digest         | sha256:37d263ccd240e113a752c46306ad004e36532ce118eb3131d9f76f43cc606d5d |\n| tag_docker_version | 1.12.3                                                                  |\n| tag_name           | 1.7.3                                                                   |\n| tag_os             | linux                                                                   |\n| tag_signature      | -                                                                       |\n| tags_count         | 2                                                                       |\n| update_time        | 2017-11-01T12:59:05Z                                                    |\n+--------------------+-------------------------------------------------------------------------+\n```\n\n### Get top accessed repositories\n\n```\n$ harbor top\n+----------------------+------------+------------+\n|         name         | pull_count | star_count |\n+----------------------+------------+------------+\n|   int32bit/busybox   |     10     |     0      |\n|   int32bit/golang    |     8      |     0      |\n| int32bit/hello-world |     1      |     0      |\n+----------------------+------------+------------+\n```\n\n### Lists members of a project.\n\n```\n$ harbor member-list\n+----------+--------------+---------+---------+\n| username |  role_name   | user_id | role_id |\n+----------+--------------+---------+---------+\n|  admin   | projectAdmin |    1    |    1    |\n|   foo    |  developer   |    5    |    2    |\n|   test   |    guest     |    6    |    3    |\n+----------+--------------+---------+---------+\n```\n\n### Show logs\n\n```\n$ harbor logs\n+--------+----------------------+----------+------------+-----------+-----------------------------+\n| log_id |       op_time        | username | project_id | operation |          repository         |\n+--------+----------------------+----------+------------+-----------+-----------------------------+\n|   1    | 2017-11-01T06:56:07Z |  admin   |     2      |   create  |          int32bit/          |\n|   2    | 2017-11-01T07:06:36Z |  admin   |     2      |    push   |   int32bit/busybox:latest   |\n|   3    | 2017-11-01T12:59:05Z |  admin   |     2      |    push   |    int32bit/golang:1.7.3    |\n|   4    | 2017-11-01T13:22:46Z |  admin   |     2      |    push   | int32bit/hello-world:latest |\n|   5    | 2017-11-01T14:21:49Z |  admin   |     2      |    push   |    int32bit/golang:latest   |\n|   6    | 2017-11-03T20:39:04Z |  admin   |     3      |   create  |            test/            |\n|   7    | 2017-11-03T20:39:22Z |  admin   |     3      |   delete  |            test/            |\n|   8    | 2017-11-03T20:39:38Z |  admin   |     4      |   create  |            test/            |\n|   9    | 2017-11-03T20:49:33Z |  admin   |     4      |   delete  |            test/            |\n+--------+----------------------+----------+------------+-----------+-----------------------------+\n```\n\n### Search projects and repositories.\n\n```\n$ harbor search int32bit\nFind 1 Projects:\n+------------+----------+--------+------------+----------------------+\n| project_id |   name   | public | repo_count |    creation_time     |\n+------------+----------+--------+------------+----------------------+\n|     2      | int32bit |   1    |     3      | 2017-11-01T06:56:07Z |\n+------------+----------+--------+------------+----------------------+\n\nFind 3 Repositories:\n+----------------------+--------------+------------+----------------+\n|   repository_name    | project_name | project_id | project_public |\n+----------------------+--------------+------------+----------------+\n|   int32bit/busybox   |   int32bit   |     2      |       1        |\n|   int32bit/golang    |   int32bit   |     2      |       1        |\n| int32bit/hello-world |   int32bit   |     2      |       1        |\n+----------------------+--------------+------------+----------------+\n```\n\n### Lists targets\n\n```\n$ harbor target-list\n+----+----------------------+-------------------------------------+----------+----------+----------------------+\n| id |         name         |               endpoint              | username | password |    creation_time     |\n+----+----------------------+-------------------------------------+----------+----------+----------------------+\n| 1  |     test-target      |      http://192.168.99.101:8888     |  admin   |    -     | 2017-11-02T01:35:30Z |\n| 2  |    test-target-2     |      http://192.168.99.101:9999     |  admin   |    -     | 2017-11-02T13:43:07Z |\n| 3  | int32bit-test-target | http://192.168.99.101:8888/int32bit |  admin   |    -     | 2017-11-02T14:28:54Z |\n+----+----------------------+-------------------------------------+----------+----------+----------------------+\n```\n\n### Ping a target\n\n```\n$ harbor target-ping 1\nOK\n```\n\n### Lists replication job\n\n```\n$ harbor  job-list 1\n+----+----------------------+-----------+----------+----------------------+\n| id |      repository      | operation |  status  |     update_time      |\n+----+----------------------+-----------+----------+----------------------+\n| 1  |   int32bit/busybox   |  transfer | finished | 2017-11-02T01:35:31Z |\n| 2  |   int32bit/golang    |  transfer | finished | 2017-11-02T01:35:31Z |\n| 3  | int32bit/hello-world |  transfer | finished | 2017-11-02T01:35:31Z |\n+----+----------------------+-----------+----------+----------------------+\n```\n\n### Show job logs:\n\n```\n$ harbor job-log  1\n2017-11-02T01:35:30Z [INFO] initializing: repository: int32bit/busybox, tags: [], source URL: http://registry:5000, destination URL: http://192.168.99.101:8888, insecure: false, destination user: admin\n2017-11-02T01:35:30Z [INFO] initialization completed: project: int32bit, repository: int32bit/busybox, tags: [latest], source URL: http://registry:5000, destination URL: http://192.168.99.101:8888, insecure: false, destination user: admin\n2017-11-02T01:35:30Z [WARNING] the status code is 409 when creating project int32bit on http://192.168.99.101:8888 with user admin, try to do next step\n2017-11-02T01:35:30Z [INFO] manifest of int32bit/busybox:latest pulled successfully from http://registry:5000: sha256:030fcb92e1487b18c974784dcc110a93147c9fc402188370fbfd17efabffc6af\n2017-11-02T01:35:30Z [INFO] all blobs of int32bit/busybox:latest from http://registry:5000: [sha256:54511612f1c4d97e93430fc3d5dc2f05dfbe8fb7e6259b7351deeca95eaf2971 sha256:03b1be98f3f9b05cb57782a3a71a44aaf6ec695de5f4f8e6c1058cd42f04953e]\n2017-11-02T01:35:31Z [INFO] blob sha256:54511612f1c4d97e93430fc3d5dc2f05dfbe8fb7e6259b7351deeca95eaf2971 of int32bit/busybox:latest already exists in http://192.168.99.101:8888\n2017-11-02T01:35:31Z [INFO] blob sha256:03b1be98f3f9b05cb57782a3a71a44aaf6ec695de5f4f8e6c1058cd42f04953e of int32bit/busybox:latest already exists in http://192.168.99.101:8888\n2017-11-02T01:35:31Z [INFO] blobs of int32bit/busybox:latest need to be transferred to http://192.168.99.101:8888: []\n2017-11-02T01:35:31Z [INFO] manifest of int32bit/busybox:latest exists on source registry http://registry:5000, continue manifest pushing\n2017-11-02T01:35:31Z [INFO] manifest of int32bit/busybox:latest exists on destination registry http://192.168.99.101:8888, skip manifest pushing\n2017-11-02T01:35:31Z [INFO] no tag needs to be replicated, next state is \"finished\"\n```\n\n### Show usage\n\n```\n$ harbor usage\n+-----------------------+-------+\n| Property              | Value |\n+-----------------------+-------+\n| private_project_count | 0     |\n| private_repo_count    | 0     |\n| public_project_count  | 2     |\n| public_repo_count     | 3     |\n| total_project_count   | 2     |\n| total_repo_count      | 3     |\n+-----------------------+-------+\n```\n\n### Show Harbor info\n\n```\n$ harbor  info\n+------------------------------+---------------------+\n| Property                     | Value               |\n+------------------------------+---------------------+\n| admiral_endpoint             | NA                  |\n| auth_mode                    | db_auth             |\n| disk_free                    | 4989370368          |\n| disk_total                   | 18381979648         |\n| harbor_version               | v1.2.2              |\n| has_ca_root                  | False               |\n| next_scan_all                | 0                   |\n| project_creation_restriction | everyone            |\n| registry_url                 | 192.168.99.101:8888 |\n| self_registration            | True                |\n| with_admiral                 | False               |\n| with_clair                   | False               |\n| with_notary                  | False               |\n+------------------------------+---------------------+\n```\n\n### Get configrations\n\n```\n$ harbor get-conf\n+------------------------------+-------------------------------------------------------+----------+\n|             name             |                         value                         | editable |\n+------------------------------+-------------------------------------------------------+----------+\n|          auth_mode           |                        db_auth                        |  False   |\n|          email_from          |           admin \u003csample_admin@mydomain.com\u003e           |   True   |\n|          email_host          |                   smtp.mydomain.com                   |   True   |\n|        email_identity        |                           -                           |   True   |\n|          email_port          |                           25                          |   True   |\n|          email_ssl           |                         False                         |   True   |\n|        email_username        |               sample_admin@mydomain.com               |   True   |\n|         ldap_base_dn         |              ou=people,dc=mydomain,dc=com             |   True   |\n|         ldap_filter          |                           -                           |   True   |\n|          ldap_scope          |                           3                           |   True   |\n|        ldap_search_dn        |                           -                           |   True   |\n|         ldap_timeout         |                           5                           |   True   |\n|           ldap_uid           |                          uid                          |   True   |\n|           ldap_url           |               ldaps://ldap.mydomain.com               |   True   |\n| project_creation_restriction |                        everyone                       |   True   |\n|       scan_all_policy        | {u'parameter': {u'daily_time': 0}, u'type': u'daily'} |   True   |\n|      self_registration       |                          True                         |   True   |\n|       token_expiration       |                           30                          |   True   |\n|      verify_remote_cert      |                          True                         |   True   |\n+------------------------------+-------------------------------------------------------+----------+\n```\n\n### Update user password\n\n```\n$ harbor change-password int32bit\nOld password: *****\nNew Password: *****\nRetype new Password: *****\nUpdate password successfully.\n```\n\n### Promote a user to administrator\n\n```\n$ harbor promote int32bit\nPromote user 'int32bit' as administrator successfully.\n```\n\n## Licensing\n\nint32bit/python-harborclient is licensed under the Apache License 2.0. See [LICENSE](./LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint32bit%2Fpython-harborclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint32bit%2Fpython-harborclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint32bit%2Fpython-harborclient/lists"}