Hi,
I'm trying to switch remote git access to my repo from https to ssh, to avoid needing to use an app password, but I can't seem to read from the repo when I change the remote. I get a "The requested repository either does not exist or you do not have access." message. When I switch the remote back to use https, it connects fine:
I have referenced this documentation for creating an ssh key and I uploaded the new key to my bitbucket profile: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/
I've referenced this page as well for changing a remote from https to ssh: https://support.atlassian.com/bitbucket-cloud/docs/change-the-remote-url-to-your-repository/
...and this troubleshooting page for help: https://support.atlassian.com/bitbucket-cloud/docs/troubleshoot-ssh-issues/
As mentioned in the documentation, I used the following command to check if I'm authenticated, it says that I am.
I'm not sure what authentication I'm failing when pulling/pushing. As far as I can tell, the remote ssh path is correct. I do use another ssh key for another git project for github, so I'm wondering if this is related to local macOS key management. Perhaps by default, the ssh key for my other project is being used. I confess I've never needed to use more than one key/profile before until this project, so I'm not sure how to configure that kind of setup, or even if it's the problem at all.
Any help or insight is appreciated, thank you.
Ok I found the problem and fixed the issue. For those who may have a similar issue, the problem wasn't in access, it was in the path itself.
I was not the original creator of the project - I was given full admin access, but the project remains in ownership with the original developer (rice121 in the terminal snippets I provided).
The SSH path for remote access needs the workplace ID of the current owner of the project, not simply one who has all admin access/permissions as I do. I was trying to give both IDs but SSH path doesn't actually need my own in my case, thus creating a "repository does not exist" response.
So for SSH:
git@bitbucket.com:<workplace_ID_of_current_project_owner>/<repo_name>
This is different from HTTPS connection which needs both the user name and workspace ID as part of the path:
https://<your_username>@bitbucket.org/<workspace_ID>/<repo_name>.git
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably in most cases that will work fine.
My issue came from the fact that I was logging into another user's project (rice121). My own workspace ID is different. I had full admin access but not ownership of the repo. So my ssh path to this project needed to remove my own ID and only use rice121 as the <workspace_ID>.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.