I know very basics of GIT and I don’t know how to handle this situation!
Client sent me a project as a zip! There is .git folder of previous developer, same .git configs are in production too.
I need to push my code and deploy it in server as well.
How to do that as I don’t have permission in that repo?
Should I create my own repository and change configs in production?
When I try to commit it says:
error: cannot open .git/FETCH_HEAD: Permission denied
>Solution :
That error is just referring to the permissions set on files on your local computer; it has nothing to do with private repositories hosted anywhere else.
If this is the copy you took from the zip file, it may have created all the files with "read only" set. You can just unset that like you would any other file.
If this is the copy on a remote server, it may be that the files are owned by a different user on the server. You need to log in as that user, or log in as admin/root and change the owner.