I cannot seem to find a question that completely relates to this. I'm using ubuntu 20.04 and my project is stored in /var/www/html/My_Project
Currently I work with a team of five and when we push or pull, we use sudo. When we do that our git repository then pulls via https and asks for credentials. As of today, GitHub no longer uses standard passwords for https, it is now a token that looks something like this "lksadknkasjvjkasd345kKja345neuhiehkjsdfn" (not actual token). This is a pain to keep and use over and over.
I setup a ssh key but had to set my key for the root user because no one has permissions to write to this directory. (I really like having to using sudo to make changes). So is there a way that we can still use sudo but use each team members key instead of just mine.
I see having everyone using my key as just a bad practice
Adding some clarification, I'm aware this is a bad setup. I'm not the guy that can change it. We have 5 devs with their own projects on this machine and every dev does not have access to all repos, so having 1 ssh key as root would not work.
We do have a production machine that is only managed by our CTO, "Code Review", when it happens, takes place on this machine before it goes to production.
So, please only answer the question if you have a solution or let me know if this is just a hopless endevor. #SolutionsNeeded