git push
showed an error and I couldn't find the cause and solution, so I came back here again
The error occurs locally when pushing remotely from the local repository in virtualbox.The remote is a bare repository of github and sakura rental servers.
error:update_ref failed for ref'refs/remotes/origin/master':cannot lock ref'refs/remotes/origin/master':Unable to create'/var/www/html/xxxx/.git/refs/remotes/origin/master.lock':???
I can push it remotely with git push, but I see this error.
Previously, the ??? part was permission denied, but after I upgraded the git version, it changed to ? (removed 1.7 from yum installation and 2.7 from manual installation)
Also, there is a file called master, but I can't find a file called master.lock even if I look at it on winspc.
You can push from the local repository to two remote repositories at once.
One is github's private repository
The other is to create a bare repository in the Sakura server by referring to the following site and pull it in a non-bare repository (directory for production publication).
Create a repository that automatically updates the website when pushed to the remote repository of Git
For more information, I would like to ask you a question that you helped me build.
I want to push from git to multiple remote repositories
Try apache for administrators below .git
in .git/refs/remotes/origin/master
Try setting the permission to 777
I did, but there was no change.
Did you search various things and it was added to the config file during git push-u origin master
?I wonder if the following is relevant...
I think so, but I couldn't think of the first step.
[ branch "master" ]
remote=origin
merge=refs/heads/master
I hope I can get your advice again.
Thank you for your cooperation.
.git
I tried apache
and 777
as the owner of the file below, and the error disappeared.
(From Comment of Questioner)
796 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1338 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
845 M2 Mac fails to install rbenv install 3.1.3 due to errors
915 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2025 OneMinuteCode. All rights reserved.