Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to push my code in a private repository?

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading