I am able to clone a repository with ssh just fine.
git clone firstname.lastname@example.org:team-name/utils.git
However, when this same repo is included as a submodule in another project, I get a Permission Denied (public key) error.
Here is the exact output I get
$ git submodule update
Cloning into '/Users/me/code/my-project/utils'...
email@example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://bitbucket.org/team-name/utils.git' into submodule path '/Users/me/code/my-project/utils' failed
Failed to clone 'utils'.
path = utils
url = ssh://bitbucket.org/team-name/utils.git
I've tried everything I can think of.
I found out that I needed to specify the user for the submodule command.
There are two ways to do this (maybe more?)
The First way: specify the user in the url
Change the value of the url field in the .gitmodules so it includes the username
url = ssh://firstname.lastname@example.org/team-name/utils.git
The Second Way: specify the user in ~/.ssh/config
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...