-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Getting Could not create pull request 404: 404 Project Not Found (-1) in a gitlab merge request integration #12439
Comments
I switched back to Git as the version control system and this is the result:
|
You should use force pushing if you are rewriting the repo (the GitLab merge requests do this automatically). There might be some issue in figuring out GitLab project URL as you're not the only one getting a 404 in this case, see #12406 |
Thanks for the fast reply @nijel and for the great job with Weblate (I've used in 3/4 projects and counting) !
I don't know what assuming fork_remotes will get a list of remotes (those would also be the full name for the fork repo), by replacing at the end we could potentially get https://gitlab.com/group/subgroup/group/subgroup/fork_repo or https://gitlab.com/group/subgroup/group/subgroup/fork_repo.git This is all speculative since I haven't tested any of this, I don't know python and I don't know Weblate's code base at all. I was doing this on cloud Weblate so I can't see logs. Will try to get Weblate to run on my machine and try to replicate the setup and I'll have you know. |
If this happened on Hosted Weblate, can you please share a link to the project so that I can debug it there? |
This allows using fine-grained access tokens instead of instance scoped access. Fixes WeblateOrg#12439
Thanks, I think #12466 should address this. |
@nijel thank you very much. I see now that it was related with having credentials in the url. This setup is not my preferred to be honest. I started with trying to add hosted Weblate's ssh key to gitlab (and either I already had It in my account or someone else had in the platform) but it failed. With the ssh key and basic git configuration (no MR) I wasn't able to get it to work (my assumption is that gitlab doesn't allow the same ssh key to be used in different projects across platform). Having a private gitlab repo in the gitlab.org instance makes it so that, since I can't add my own ssh key to Weblate (hosted, to my knowledge), or add hosted weblate ssh public key to gitlab, I have to generate a deploy token, or other tokens (personal ones) and set them in the url (again, I don't think there's any other configuration page to set this kind of credentials in hosted Weblate, please correct if I'm wrong). This doesn't seem super cool to me, in the sense that that url's are usually not considered to be secret data, (they might get logged anywhere, standard storage types, etc). If you know of another way to authenticate towards the repo in Weblate let me know. Other than that, thank you. Very good job! |
Storing secrets in URL should be safe in Weblate, the code was written with the intention that the secrets might be present there. But of course, bugs can always happen. Documented approach is to add |
This allows using fine-grained access tokens instead of instance scoped access. Fixes #12439
Thank you for your report; the issue you have reported has just been fixed.
|
This makes it really possible to use fine-grained https credentials for pull requests. Fixes #12439
Describe the issue
When using gitlab merge request as the version control system, when trying to push I always get "Could not create pull request 404: 404 Project Not Found (-1)."
Not only I don't understand the error, but it seems like it's trying to search something on GitHub, since it mentions pull request instead of merge request
I already tried
Steps to reproduce the behavior
Expected behavior
A gitlab merge request being created. I'm getting the commit but the Weblate UI says it's still pending and the push fails (in theory)
Screenshots
Exception traceback
No response
How do you run Weblate?
weblate.org service
Weblate versions
The current on hosted Weblate.
Weblate deploy checks
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: