SSH 인증은 작동하지만 git clone은 작동하지 않습니다.

SSH 인증은 작동하지만 git clone은 작동하지 않습니다.

저는 Windows 10을 사용하고 있는데 왜 bitbucket에서 저장소를 복제할 수 없는지 정말 혼란스럽습니다. 키 쌍을 생성하고 공개 키를 내 bitbucket 계정에 추가하고 개인 키를 ssh-agent에 추가했습니다. ssh-add -l올바른 키인 C:\Users\"username"\.ssh\id_rsa (RSA)를 보여줍니다. 이제 다음을 사용하여 ssh를 사용하여 bitbucket에 연결하려고 시도하면 다른 많은 줄이 반환됩니다.ssh -vT [email protected]

debug1: identity file C:\\Users\\<username>/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\<username>/.ssh/known_hosts:2
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:9CVIiWqSy1eKuUS7yhmwum6VgKrW/tJE0/T2PWdAWmQ C:\\Users\\<username>/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
**debug1: Authentication succeeded (publickey).**
Authenticated to bitbucket.org ([18.205.93.2]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logged in as <user>

You can use git or hg to connect to Bitbucket. Shell access is disabled

하지만 내 저장소를 복제하려고 하면 다음과 같은 결과가 git clone <repo_url copy pasted from bitbucket directly>나타납니다.

Cloning into '<repo_name>'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

저장소의 설정을 보면 쓰기 권한이 있습니다. 정확히 무엇이 잘못되고 있는지 정말 모르겠습니다. 어떤 아이디어가 있습니까? Https가 작동하므로 권한 문제가 될 수 없습니다. 하지만 SSH를 사용하고 싶습니다. 이상한 점은 key_load_public이 키가 존재함에도 불구하고 키를 찾지 못했다가 나중에 어떤 이유로 인증이 성공한다는 것입니다.

답변1

복제하려는 저장소 관련 설정에서 사용 가능한 액세스 키를 추가했을 가능성이 있습니다. 저장소에 대한 읽기 전용 액세스를 제공합니다. 아래 이미지를 참조하세요.

여기에 이미지 설명을 입력하세요

Bitbucket 계정 설정에 SSH 키를 추가했는지 확인하고 다시 확인하세요.

관련 정보