2

I have a private repo that needs to be deployed to many IoT devices (RasPi). I'd like to be able to git pull via cron job. I'm wondering how to manage the read-only access to the repo:

  • access to code is not a consideration as it will be available on the device anyway
  • deploy keys don't seem to work as they grant write access

I'm thinking about using a dedicated github user with read-only access for this purpose. Are there other or better options?

andig
  • 13,378
  • 13
  • 61
  • 98
  • Not sure I understand your problem, [Github Organization](https://github.com/blog/674-introducing-organizations) provides a read-only access. – Rakesh Sankar Jan 28 '15 at 21:36
  • 1
    Unfortunately organizations require username and password which I would need to make public then- also granting access to e.g. issues. – andig Feb 03 '15 at 15:18

1 Answers1

5

Are there other or better options?

Another (similar to a dedicated user) is to have a mirror of your private repo in a public repo.

That public repo can be only accessible by its owner (the "dedicated user"), and is read-only for the rest of the world.

One way is to set up a webhook in order to listen to the push event and push to the mirror.

But if you are the only contributor to the private repo, it is easier to directly push to both remotes (the private and public ones).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250