Tanoro
Tanoro

Reputation: 869

Permission denied when cloning project

I am attempting to clone an existing project from Bitbucket onto my Windows work station.

I have generated my keys using ssh-keygen in Windows Powershell and saved to ~/.ssh. I added my pub key to my Bitbucket account. I use ssh -T [email protected] to verify that I can login and it is certainly using my account.

My project leader has verified backwards and forwards that I have full permissions to this project. I have pulled from and pushed to it from other work stations.

But cloning the project onto this computer returns Permission denied (publickey). Fatal: Could not read from remote repository.

I run ssh -Tv [email protected] and verified that it is using my correct public key. We're at a loss about what could be causing this permission issue.

Upvotes: 1

Views: 1013

Answers (1)

Tanoro
Tanoro

Reputation: 869

SOLVED!

My config file in the ~\.ssh directory was not correct. I was unfamiliar with how this file was suppose to be structured. It was configured for Github instead of Bitbucket and was not properly indented. This post was helpful. https://superuser.com/a/232406

After fixing this, I tried to clone again and it through a new error. Invalid repository syntax. I removed ssh:// from the repository path and tried it as Bitbucket instructs. Cloning succeeded.

Upvotes: 1

Related Questions