[solved] best way to grant access to a single repository?
hello! For University I need to use a remote machine with a very very VERY weak password I cannot change, and I have to use that machine to edit some code with a few other students of my team. All the code should then be pushed to a repo of my personal github. I'd like to be able to grant access to only that repo, so that if someone guesses the password it cannot touch my other stuffs. What options do I have?
[SOLVED] EDIT:
as suggested by @elliot_crane@lemmy.world I created a github fine grained access token setting its only permission as read/write only that repo. Then I cloned the repo on the remote machine and set the url to include the token:
and voilà! I can now simply push without any password requested! And in case someone gained access to the token (that is stored in plain text inside the .git folder) it would only grant access to that specific repo, limiting the damages
Take a look at fine grained personal access tokens on GitHub, and this SO thread that discusses using them over HTTPS. In theory this should allow you to make a token that can only access the one remote repository, for a temporary duration you define (you could set this to end shortly after your semester for instance). I’ve never personally set this up so YMMV, but this seems to be the right way to achieve what you want.