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 @[email protected] 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:

git remote set-url origin https://myusername:[email protected]/myusername/myrepo.git 

I then set the user and email:

git config user.name myusername
git config user.email [email protected]

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

  • tubbaduOP
    link
    fedilink
    29 months ago

    It worked great! exactly what I was looking for, thank you very much!

    • @elliot_crane
      link
      29 months ago

      Glad to hear, good luck with your project.