If you use a HTTP URL, you cannot push data via HTTP. HTTP is for read only access. Use ssh instead.
Do git remote -v to check if your repository URL is a HTTP one.
You can change this URL by doing this git remote set-url origin ssh:user@server/dir/project.git