git commit --author does not require password? -
my situation following: there 2 people have access private repo , work on code. 1 guy has wrote code on other guy's computer , wants commit name not name of other guy.
i have seen here how commit author repository. have done strange didn't require password of author name committing. not normal. people can commit myself code have not written , not responsible for?
git not handle authorization. way works, can change identity using git config
or --author
argument make commits whoever want. these commits stay local computer until decide push them.
remote servers opt in have sort of authentication. commonly done using ssh protocol. in addition, many add authorization layer restricts accessing repositories. example on github, may push repositories own or explicitely got write access.
this access control apply act of pushing changes. if have access repository, can push whatever commits want, whatever author want. possible providers add check rejects pushes when contain commits not authored (or committed) pushing user. however, behavior not desired.
the reason git distributed version control system. unlike example subversion, people don’t have use same centralized server can ensure publish changes made (subversion assumes , “commits” created on server). instead, possible—and desired—that commits go different routes until land on central repositories (multiple repositories common too). work directly developer , push changes into, or pull changes private repository without ever having interact sort of central server. , when decide publish commits central server, of course central server should not reject changes because included commits other developer.
so no, there no guarantee else isn’t using “identity” create commits in name. git support signing commits, allow you prove commit of own. interested in validating can check signature on commit , verify made yourself. repository servers may require commits pushed server signed, , verify signature on each commit. totally optional , not git comes default; because default git “stupid content tracker”.
Comments
Post a Comment