Skip to content

Cannot push to my repo (mirror is readonly) #7609

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

Open
2 of 7 tasks
clementrey opened this issue Jul 25, 2019 · 15 comments
Open
2 of 7 tasks

Cannot push to my repo (mirror is readonly) #7609

clementrey opened this issue Jul 25, 2019 · 15 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@clementrey
Copy link

clementrey commented Jul 25, 2019

  • Gitea version (or commit ref): 1.5
  • Git version: 2.17.1
  • Operating system: Debian buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Hello

I have a repository hosted by gitea running locally on my machine (through a VM). This repository is mirroring a remote repositry hosted somewhere else.
When I try to push to my gitea repository, I have the following error message (I have added verbose flags)

remote: mirror repository is read-only
fatal: unable to access 'http://X.X.X.X:YYYYY/myUser/myPorject.git/': The requested URL returned error: 403

I don't know why mirror repository is in Read Only. I have checked and I can very well pushed commit to the mirrored repo.

Do you what is the reason of this error ?
Best Regards

@zeripath
Copy link
Contributor

You cannot push to mirrored repositories. You will either need to fork the mirror and update the fork from the mirror intermittently manually, or, you need to push to the upstream.

If we allow pushes to mirrors and a conflicting change from upstream occurs what is supposed to happen?

@SoulSeekkor
Copy link

Running into this same problem, could do this in Bitbucket by forking a repo and telling it to keep it in sync. This way I was able to create new branches for what I wanted to change, this worked perfectly as the forked repo would pull in new tags and commits on master, etc. and as long as I didn't do something silly like name a branch something that would be synced it's fine doing so (last time when I commited to master to see what would happen it simply stops syncing as the history has changed).

This is built-in functionality in Bitbucket. I've included a screenshot of what this looks like after you click create fork next to a repo in that, it would be great to see this in Gitea as well.
Untitled

@lunny
Copy link
Member

lunny commented Jul 31, 2019

You could create a mirror of that repository.

@SoulSeekkor
Copy link

SoulSeekkor commented Jul 31, 2019

That doesn't work as the mirror is readonly. I have a mirror created so that I have a local copy of the remote repo, now I want to add branches with custom changes, currently there is no way to do that and keep it in sync.

@SoulSeekkor
Copy link

If nothing else in my case it'd be great if on the fork of the repo I could click a button to update a specific branch to the latest or something similar.

@stale
Copy link

stale bot commented Sep 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Sep 29, 2019
@lunny lunny added type/feature Completely new functionality. Can only be merged if feature freeze is not active. issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Sep 30, 2019
@stale stale bot removed the issue/stale label Sep 30, 2019
@KenMercusLai
Copy link

you can convert it to a regular repo in the setting page of your repo.

@6543 6543 mentioned this issue Sep 3, 2020
24 tasks
@lunny lunny mentioned this issue Feb 8, 2021
7 tasks
@EslamFouadd
Copy link

The GCP repositories shell still having the same problem when I commit and push a change to the files in my repos on GCP.

Any updates for the solutions?

@qiangzai201611
Copy link

You need to set the image warehouse to a regular warehouse, otherwise prompt: remote: mirror repository is read-only

@qiangzai201611
Copy link

image

@hermannoffen
Copy link

If it shouldn't be possible for a mirror repository to pull and push from/to remotes, then why is it configurable like this?
I cloned a GitHub organisation repository as a pull mirror and added it as a push target afterwards as well. Synchronizing the push mirror manually from gitea's repo settings was successful, then. But pushing to my gitea repo ended up with the error message mentioned in this issue.

@letto4135
Copy link

I agree with @hermannoffen, if you can't set up push pull syncing it shouldn't be an option, and since you can set that up the mirror shouldn't be read only.

@rushimahindrakar
Copy link

I am also facing the same issue. is there any option now to without create new repo?

@lunny
Copy link
Member

lunny commented Jan 16, 2025

Maybe we could have a branch list configuration that will be mirrored and then other branches could be pushed. The default value is all branches are mirrored but allow users to change.

@lunny
Copy link
Member

lunny commented Jan 16, 2025

If nothing else in my case it'd be great if on the fork of the repo I could click a button to update a specific branch to the latest or something similar.

This has been implemented in v1.23.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

No branches or pull requests

10 participants