prashant kumar gupta
prashant kumar gupta

Reputation: 33

how a user is able to push on bitbucket private account without giving him access?

I have a BitBucket private repository (MyRepo). I have given Write permission of MyRepo to user [email protected].

I cloned MyRepo locally.

I have set git config user.email abc@gmail so I am able to push with this email.

Then I updated email to git config user.email other@gmail

Still, I am able push with [email protected]. Logically It should not happen because I have not given permission to [email protected]

Please Clarify why and how this is happening??

Upvotes: 1

Views: 151

Answers (1)

Gihan
Gihan

Reputation: 4283

git config user.email is just for identifying the user of the commit. It has no relation with who can push to the remote repository. Git push is authorized by your ssh key or http authentication.

If you want to control who can push to the remote repository you have to manage it from there (Bitbucket) and remove the user from the repository.

Upvotes: 1

Related Questions