我尝试使用用户 www-data 从bitbucket中提取/克隆git项目。部署密钥已创建并添加到bitbucket的Access密钥中。我具有读取权限的服务器响应,但是当我尝试提取或克隆时,访问被拒绝。
www-data@server:~$ git clone git@bitbucket.org:project/repo.git
Cloning into 'repo'...
repository access denied. deployment key is not associated with the requested repository.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
www-data@server:~$ ssh -T git@bitbucket.org
authenticated via a deploy key.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
This deploy key has read access to the following repositories:
project/repo: wwwdata2 -- www-data@server
答案 0 :(得分:0)
访问键与一个或多个特定的回购关联,而不是与项目或用户关联。如果您收到此消息,则需要将该访问密钥添加到需要它的存储库中。