In my case, my team lead to created a repo(repo was empty) and assign me as developer so when I pushed to the code directly to master the error I was facing ! [remote rejected] master -> master (pre-receive hook declined)
So how it was fixed that he assigned to me as maintainer so I was able to push the code directly to the master.