Mirror more data per repo and allow arbitrary user mirroring#6
Mirror more data per repo and allow arbitrary user mirroring#6Brycey92 wants to merge 3 commits into
Conversation
| visibility="${1:-}" | ||
| log "Create migration user with name: ${github_user}" | ||
| local password=$(tr -dc 'A-Za-z0-9!@#$%^&*()_+\-=[]{}\|;:,.<>/`~' < /dev/urandom | head -c 64) | ||
| if ! $CURL -X POST $GITEA_URL/api/v1/admin/users "${header_options[@]}" --data '{"username": "'"${github_user}"'", "visibility": "'"${visibility}"'", "email": "'"${github_user}@example.com"'", "password": "'"${password}"'", "must_change_password": true}' > ${jsonoutput}/result.txt 2>${jsonoutput}/stderr.txt; then |
There was a problem hiding this comment.
Despite the Gitea API documentation saying the password field is not required, it is required, and Gitea will return a 400 Bad Request error without it.
|
Thank you for your PR, @Brycey92!
This would break existing deployments that do not use an auth token (e.g., if one wants to mirror a public organization), right? I like that!
Well done. |
|
One additional thought came to my mind: it would be nice if the mirroring of git LFS data and wikis would be configurable individually. Maybe not all users want to mirror a whole bunch of large(r) data files or the wiki information. |
|
Any updates on this? :) |
No updates from my side. I'm still waiting for a response of @Brycey92 :) |
Enable LFS and wiki mirroring, and use auth token for all repo mirrors
Allow --mode user to fetch repos of arbitrary --user value
Improve error handling and error clarity
I made a number of design decisions while writing this that you'll have to decide whether you like or not. Where possible, I attempted to avoid breaking existing command syntax.