You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I have a repository, for which I have set the master access for a specific user only. Which works fine in normal scenarios. But as I noticed, there is a workaround by which users can still commit to the master branch.
The process I followed:
1.) Let's say there is a repository with name repo-1.
2.) In Branch Permissions I have set write access to a specific user only say User1:
master -> Write access -> User1
3.) Now there is another user Say User2. Who doesn't have access to commit to the master branch.
Now to commit to the master branch, all he has to do is as follows:
1.) Update the Global config File ~/.gitconfig and add User1 as user and email. No password required.
In the repo, he can have his username as User2. when the user will push the commit, He will be asked password as per the repo configuration. and after successful authentication. the push will be published to the master branch without any restriction.
And the most amazing part is, Even commit will be Displayed as User1.