Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

switching from https to ssh for bitbucket

Tags:

git

ssh

bitbucket

I have the ssh url of my repo

[email protected]:accountUser/repo.git

and my remote url for fetch and push:

ssh://[email protected]:accountUser/repo.git

I've generated a new private and publich ssh key, the private has been added to the ssh agent and the public has been added to ssh keys in bitbucket.

If I use git-bash on the local server and put

ssh -T [email protected]

it prints the accountUser matching the remote URL

However, git pull and git fetch return in powershell:

permission denied (publickey_ could not read from remote repository

and in gitbash it returns

invalid repository syntax, could not read from remote repository

after prompting for teh passphrase on the key.

What have I done wrong here? I'm just trying to fix the issues from bitbuckets disabling of TLS v1.1

like image 695
Geoff_S Avatar asked Sep 15 '25 04:09

Geoff_S


1 Answers

Your remote url

ssh://[email protected]:accountUser/repo.git

has wrong syntax. Fix it:

ssh://[email protected]/accountUser/repo.git
like image 111
phd Avatar answered Sep 17 '25 18:09

phd