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

403 Error on git push to the weblate git repo #7081

Closed
2 tasks done
emanuele-f opened this issue Jan 9, 2022 · 8 comments
Closed
2 tasks done

403 Error on git push to the weblate git repo #7081

emanuele-f opened this issue Jan 9, 2022 · 8 comments
Labels
question This is more a question for the support than an issue.

Comments

@emanuele-f
Copy link

Describe the issue

I've fixed a merge conflict on my local clone of the hosted weblate git repository for my project. When I try to push the changes to the upstream hosted weblate repo, I get The requested URL returned error: 403. I've tried the following URLs without success (username and tokens replaced with myuser and myapitoken):

https://myuser:[email protected]/git/pcapdroid/app/
https://[email protected]/git/pcapdroid/app/
[email protected]/git/pcapdroid/app/

I've checked https://docs.weblate.org/en/latest/faq.html#how-to-fix-merge-conflicts-in-translations but it didn't help.

Here is a portion of the log when pushing via HTTPS:

12:20:30.200757 http.c:611              => Send header, 0000000224 bytes (0x000000e0)
12:20:30.200765 http.c:623              => Send header: GET /git/pcapdroid/app/info/refs?service=git-receive-pack HTTP/2
12:20:30.200770 http.c:623              => Send header: Host: hosted.weblate.org
12:20:30.200773 http.c:623              => Send header: user-agent: git/2.34.1
12:20:30.200777 http.c:623              => Send header: accept: */*
12:20:30.200782 http.c:623              => Send header: accept-encoding: deflate, gzip, br, zstd
12:20:30.200785 http.c:623              => Send header: accept-language: en-US, *;q=0.9
12:20:30.200789 http.c:623              => Send header: pragma: no-cache
12:20:30.200793 http.c:623              => Send header:
12:20:30.248954 http.c:664              == Info: TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
12:20:30.249020 http.c:664              == Info: TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
12:20:30.249036 http.c:664              == Info: old SSL session ID is stale, removing
12:20:30.249059 http.c:664              == Info: Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
12:20:30.279822 http.c:611              <= Recv header, 0000000013 bytes (0x0000000d)
12:20:30.279835 http.c:623              <= Recv header: HTTP/2 403

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. git remote add weblate https://hosted.weblate.org/git/pcapdroid/app
  2. git fetch weblate
  3. git checkout -b weblate weblate/master
  4. solve the merge conflict
  5. git remote set-url weblate https://myuser:[email protected]/git/pcapdroid/app/
  6. git push weblate master

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@emanuele-f emanuele-f added the question This is more a question for the support than an issue. label Jan 9, 2022
@github-actions
Copy link

github-actions bot commented Jan 9, 2022

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented Jan 9, 2022

Push to Weblate is not supposed to work, push to the upstream repo and let Weblate fetch changes from there.

@emanuele-f
Copy link
Author

I see, thanks for your reply. I don't like very much this choice as for me the upstream branch is the one which should be kept clean and tidy. However I understand that pushing to weblate may not be technically possible due to some bindings between git and the data model.

@nijel
Copy link
Member

nijel commented Jan 10, 2022

The reason is that Weblate is supposed to contain only localization changes compared to upstream. Limiting this would be very problematic at the Git level.

What kind of changes are you trying to push when they are not suitable for upstream?

@emanuele-f
Copy link
Author

I want to manage commits manually, in particular squash commits and only integrate language files which I think are mature enough. However, this will inevitably lead to conflicts with the weblate branch. Here I provide a more in-depth explanation of what I want to accomplish.

One git-based solution I think it could work is weblate keeping each language into its own branch, with the ability to pull-request a specific language. When the PR is merged upstream, the weblate language branch could discarded and created from scratch upon need. This is just my thinking, I don't know if this is even feasible with weblate or some better approach is already available.

@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@nijel
Copy link
Member

nijel commented Jan 10, 2022

What, I think, would work is cherry picking (and squashing) whatever changes you want from the Weblate repo, pushing that upstream and let Weblate rebase on top of that. This way Weblate would still have commits on top of your repo with unfinished translations.

See also #3436 and #3745 for related topics.

@emanuele-f
Copy link
Author

emanuele-f commented Jan 10, 2022

Thanks for the pointers, I'll experiment with it.
Edit: selecting "pull" instead of "update" from the dropdown in the maintenance page fixed the conflict and synced the project. In the future more complex conflicts may arise but for now this is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants