Permission denied (publickey) fatal: Could not read from remote repository
I try with sudo and I get the same error, I create the folder, I give write permissions to rule out possible permission issues and the error is the same, after searching, and read the bitbucket documentation, for security when making the clone, ( can be because it is a private repository, this only allows it in its free version bitbucket, github does not allow it) we must include the ssh key of our team.
To fix it, you must generate the ssh key again
ssh-keygen -t rsa
or if we already have a key generated, we can copy it to the clipboard with the instruction
xclip -sel clip <~ / .ssh / id_rsa.pub
user1 @ laptop: ~ / tmp $ sudo git clone [email protected]: repo / myrepo.git
Clone in «myrepo» ...
remote: Counting objects: 651, done.
remote: Compressing objects: 100% (604/604), done.
remote: Total 651 (delta 292), reused 113 (delta 34)
Receiving objects: 100% (651/651), 1.89 MiB | 1.42 MiB / s, done.
Resolving deltas: 100% (292/292), done.
Checking connectivity ... done.