I can’t edit cloned git files on the PC

Asked

Viewed 100 times

0

I have to do a job and put it in git with a friend, he already gave permission for my account to be a contributor. I cloned the project on my PC so I could program my share and send it to github when I’m done. But when I open the cloned files on the PC and try to edit (putting more code) it is not possible to save the changes, denied permission. I wonder how I can fix this.

The program is in C++, I have tried using normal text editor and IDE, but in neither of the two I was able to edit. Ubuntu 18.04 operating system

  • tries to check if you are really contributor, usually arrives an email and you confirm

  • Send us the log of "denied permission".

  • 1

    You probably did the git clone as a super-user.

2 answers

0

If you can’t edit files on your machine, the error that appears to Windows already says, is permission problem, but permission on your file system and not on github for example. Try giving write permissions to your user in the folder where you cloned the project. If your operating system is linux, search for the command chmod, if you are using windows, see if this link helping.

0

There is this matter HERE that can help you better understand how the process works.

The two errors that can occur is:

  1. You are not a collaborator, and therefore not allowed to work on the project.
  2. Your operating system does not give you permission to edit the files.

In the first case you need to be invited and accept the invitation, on the Github project page will appear, just above the used language bar, in the right corner the contributors menu, your name should be there.

In the second case the mistake must have been caused by you, probably at the time of git clone you must have used the sudo that of super user permission and your default user is unable to access these files, two basic solutions would be: give permission to your user or simply make the clone with your user, there is no reason to use the sudo in this case.

After this done, just follow the flow with the branchs and merges avoiding as much as possible file conflicts, this is another "mistake" that can happen while making a pull --rebase or a push of the data, they happen when you both edit the same line of the same file, so you have to decide which of the changes to keep and move on with the process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.