Prevent pushing to master directly

We have installed GITEA and the settings file is at /go/custom/conf/app.ini

In this presently the settings are DISABLE_HTTP_GIT = false

So when we enter the command git clone http:///username/testingrepo.git
It clones directly in local with out any password even though its a private repository
BUT the issue we are facing is it even pushs to master directly without any password or prompting of password…

git add -A
git commit -m “comment your changes here”
git pull origin master

The above will push all the changes to master…

So what I did is I have made
DISABLE_HTTP_GIT = true you cant access through http…

and USE_COMPAT_SSH_URI = true

Through this you cant push to master BUT the password authentication is also not working and no one can access it… clone is also not working

ALL I NEED IS A PERFECT ACCESS RIGHTS TO USERS LIKE

  • THEY SHOULD PUSH OR CLONE ONLY VIA PASSWORD (if this is a private repository)
  • They can clone if it is a public repo BUT cant push to master without password…
  • TO PUSH OR PULL VIA USER OR DIRECT MASTER, THEY SHOULD ENTER A PASSWORD

what settings needs to be done in ini or any other area… kindly guide me

Finally we got the solutions… we have to change the path URL ar SSH_domain… Thank you