Stop users committing to git as wrong user

后端 未结 2 2010
南笙
南笙 2020-12-15 07:35

I\'m using git and Codebase for a project.

I just did a test and I\'m able to commit to the git repository with a different email address and name set which causes i

2条回答
  •  抹茶落季
    2020-12-15 08:06

    Sorry my post got deleted before I submitted my latest update:

    You can commit as someone else when you have their credentials.

    Just to clarify, the scenario you are asking about is as follows:

    Users Foo and Bar can commit to the repo. You want to prevent user Foo from committing to the repo as user Bar.

    In this case, user Bar would have to protect their private SSH key, just like they would protect a password. As that is used to authenticate your commit.

提交回复
热议问题