Unable to push: missing write-ref permission

Problem Solution
git push origin master

results in

... User bruno does not have write-ref
privilege for reference refs/heads/master.

Grant the write-ref permission:

p4 grant-permission -u bruno -p write-ref -d gD1

You can specify an entire depot or repo, or limit the user to one or more branches or tags. See p4 grant-permission in Helix Core Command-Line (P4) Reference.

Note

A user with the write-ref permission also needs p4 protect write access.