You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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:
This is different from HTTPS connection which needs both the user name and workspace ID as part of the path:
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>.