We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 无法使用api创建镜像仓库
填写完整问题的描述和复现的步骤
import requests # API endpoint api_endpoint = "http://124.223.177.10:8010/repositories" # Repository URL to mirror github_url = "https://github.com/icyleaf/hpr.git" # API request data data = { "url": "https://github.com/icyleaf/hpr.git" } # Username and password for basic authentication username = "****" password = "*******" # Send API request with basic authentication response = requests.post(api_endpoint, json=data, auth=(username, password)) # Check response status code if response.status_code == 200: # Print job ID result = f"Mirror repository creation job ID: {response.json()['job_id']}" print(result) else: # Print error message result = f"Error creating mirror repository: {response}" print(result)
返回结果
{ "message": "undefined method `ssh_url_to_repo' for []:Gitlab::PaginatedResponse" }
使用环境:
补充信息 补充提交 bug 的完整信息,如果有 hpr.log 或 sidekiq.log 日志和 hpr.yml 配置文件为佳。
hpr.log
sidekiq.log
hpr.yml
2024-04-18T08:46:56.764Z pid=52676 tid=12bw WARN: ArgumentError: concurrency: 0 is not a valid value 2024-04-18T08:46:56.765Z pid=52676 tid=12bw WARN: /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:284:in `block in validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `each' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:26:in `parse' /usr/local/bundle/gems/sidekiq-6.1.2/bin/sidekiq:27:in `<top (required)>' /app/bin/sidekiq:29:in `load' /app/bin/sidekiq:29:in `<main>' 2024-04-18T08:46:57.738Z pid=52682 tid=12bm WARN: ArgumentError: concurrency: 0 is not a valid value 2024-04-18T08:46:57.740Z pid=52682 tid=12bm WARN: /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:284:in `block in validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `each' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:26:in `parse' /usr/local/bundle/gems/sidekiq-6.1.2/bin/sidekiq:27:in `<top (required)>' /app/bin/sidekiq:29:in `load' /app/bin/sidekiq:29:in `<main>' 2024-04-18T08:46:58.751Z pid=52688 tid=12c8 WARN: ArgumentError: concurrency: 0 is not a valid value 2024-04-18T08:46:58.753Z pid=52688 tid=12c8 WARN: /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:284:in `block in validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `each' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:283:in `validate!' /usr/local/bundle/gems/sidekiq-6.1.2/lib/sidekiq/cli.rb:26:in `parse' /usr/local/bundle/gems/sidekiq-6.1.2/bin/sidekiq:27:in `<top (required)>' /app/bin/sidekiq:29:in `load' /app/bin/sidekiq:29:in `<main>'
The text was updated successfully, but these errors were encountered:
应该是 gitlab 16 改了 API 结构,好久没适配了。
BTW,上来就贴 Python 代码是让我现学吗(笑)
Sorry, something went wrong.
应该是 gitlab 16 改了 API 结构,好久没适配了。 BTW,上来就贴 Python 代码是让我现学吗(笑)
好的,感谢回复😂。请问近期有更新hpr的计划吗?如果没有我可能计划自己直接调用gitlab的api尝试实现一下。
查了 Gitlab API 并没有发生变化,做了一点调整 88eaa5e
试试 icyleafcn/hpr:nightly
icyleafcn/hpr:nightly
No branches or pull requests
问题描述
无法使用api创建镜像仓库
返回结果
使用环境:
补充信息
补充提交 bug 的完整信息,如果有
hpr.log
或sidekiq.log
日志和hpr.yml
配置文件为佳。The text was updated successfully, but these errors were encountered: