I just came across the problem that i wanted to push some changes in a repository which didn’t have commit rights, since it was only configured via deploy keys. It turned out that it’s possible to seperate the pull and push urls and their corresponding credentials.
git remote -v
origin firstname.lastname@example.org:User/forked.git (fetch)
origin email@example.com:User/forked.git (push)
you get a list of those.
git remote set-url --push origin https://firstname.lastname@example.org/git/url.git
sets a different user/url for the current repository. Then you can just push with