'How to commit a file to BitBucket with SSH authentication in REST API

I want to push a file to bitbucket using my ssh key with REST API.

I followed the steps here to setup ssh key: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

I looked at the documentation to authenticate with ssh key to push file: https://developer.atlassian.com/cloud/bitbucket/rest/intro/

authenticate with ssh key is hard requirement. Any thoughts how to do it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source