Error: unable to create file (filepath): Permission denied

I’m having this issue where I add, commit and push changes from my local machine on a private repo, and when I pull the changes onto another machine on the server, it is saying “error: unable to create file (insert filepath here): Permission denied”. Then the file I wanted to make changes to gets deleted from that machine and I have to restore the file. Then, when I pull again, the pull is successful? This error does not occur every time I try to pull changes, but it is happening enough to where it is becoming inconvenient. Does anyone know what the issue could be?