difference between account ssh-key vs deployment ssh-key

倖福魔咒の 提交于 2020-08-22 04:27:41

问题


Can someone please explain what is the difference between account ssh-key vs deployment ssh-key?

I have made use of them frequently but never tried to learn how they differ.


回答1:


Your ssh account key does identify you, and allows you to interact with GitHub as you (meaning for instance; you can push to your own repo)

Your ssh deploy key, as mentioned in "Read-only deploy keys" are keys with read-only access.
It does not authenticate you.

A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. They are often used to clone repositories during deploys or continuous integration runs.
Deploys sometimes involve merging branches and pushing code, so deploy keys have always allowed both read and write access. Because write access is undesirable in many cases, you now have the ability to create deploy keys with read-only access.

You can create a read/write deploy key, but its ability to be read-only is in contrast with an account SSH key: the latter (SSH key) will always be for read/write access to your repositories.

You find the same purpose for deploy keys at BitBucket:

A deployment key grants read-only access to a public or private repository. With a deployment key a user or a process can pull or clone a repository over SSH. Deployment keys have the following features and limitations:

  • Deployment keys do not apply to your plan limit.
  • You can add the same deployment key to multiple repositories.
  • The deployment key must be unique — it cannot also be associated with an account.


来源:https://stackoverflow.com/questions/39659302/difference-between-account-ssh-key-vs-deployment-ssh-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!