Sharing projects
Let other people clone your projects, and work on a team's projects.
Your projects are private: only you can clone them or see their status. Share one to let other people clone it.
Share a project #
share lets users clone a project and see its status, branch, variable
names, and logs. --everyone shares it with every account that can log in:
1ssh cd.pico.sh share blog bob
2ssh cd.pico.sh share blog --everyone
share blog on its own shows who it's shared with, and unshare stops
sharing it:
1ssh cd.pico.sh unshare blog bob
2ssh cd.pico.sh unshare blog --everyone
Sharing never lets anyone push, deploy, or open shells. Anything committed
to a shared project can be read by whoever it's shared with, .env files
included; keep secrets in variables, which they see by name only.
Clone someone else's project #
Another owner's project is ~<owner>/<project>:
1git clone ssh://cd.pico.sh/~alice/blog
2ssh cd.pico.sh status '~alice/blog'
3ssh cd.pico.sh logs '~alice/blog' -f
Quote it in commands, since shells expand ~alice when there's a local
user named alice. projects lists your projects, then the ones shared with
you.
pico.sh accounts with pico+ or an invite can log in. Accounts without access to picd have no environment of their own: they can only clone and view what's shared with them. If your access lapses, you can still clone your own projects.
Teams #
Some projects belong to a team, such as pico, that nobody logs in as.
picd's operator gives people a role on a team's projects:
| Role | Can |
|---|---|
| read | Clone, and see status, branch, variable names, and logs |
| deploy | Also push, redeploy, change the branch and variables, and sync the upstream |
| admin | Also open shells, run compose and other commands, remove and delete projects, change the upstream, and share |
Team projects take the same ~<owner>/<project> names, in git remotes, in
commands, and as the SSH user:
1git remote add picd ssh://cd.pico.sh/~pico/pgs
2git push picd main
3ssh -t '~pico/pgs@cd.pico.sh'
4ssh '~pico@cd.pico.sh' projects
With ~pico as the SSH user, commands act on the team, and whoami shows
your role on it: projects lists
its projects you can see, and bare project names are its projects. Admins
on every one of a team's projects can also manage its custom domains and
reach its containers with ~pico/c-<container>.
A team's projects share one environment, so anything pushed to one of them can reach the others. Deploy access to one team project is close to admin on all of them.