[root@salt srv]# git remote set-url origin ssh://git@bitbucket.di2e.net:7999/~jeff.sikala/salt-training.git
[root@salt srv]# git push -u origin --all
FIPS mode initialized
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any idea what this is about?
Either the relevant SSH key isn't associated with a user on your Bitbucket Server instance, or it's not immediately available to the SSH agent on your local system. There isn't enough detail here to really tell which is the case, but you can collect some useful information with these commands:
# ssh-add -L
# GIT_SSH_COMMAND="ssh -v" git push -u origin --all
The first command will list all the SSH identities known to the SSH agent. If your key isn't listed, then add it with `ssh-add /path/to/key`.
The second command will give a verbose output for the SSH parts of the push, which can help narrow down what's going on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.