【问题标题】:git access for www-data via ssh to bitbucketgit 通过 ssh 访问 www-data 到 bitbucket
【发布时间】:2018-01-16 06:03:17
【问题描述】:

我正在尝试使用用户 www-data 从 bitbucket 中提取/克隆 git 项目。部署密钥已创建并添加到 bitbucket 的访问密钥。我具有读取访问权限的服务器响应,但是当我尝试拉取或克隆时 - 访问被拒绝

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

【问题讨论】:

  • 上面的两个project/repos,一个是你git clone,另一个是Bitbucket告诉你密钥可以访问的存储库,是相同的吗?
  • 同样的,来自这个存储库的访问密钥。

标签: git ssh permissions bitbucket


【解决方案1】:

访问密钥与一个或多个特定存储库相关联,而不是与项目或用户相关联。如果您收到此消息,则需要将该访问密钥添加到需要它的存储库中。

【讨论】:

  • 仅添加到此存储库的访问密钥。
猜你喜欢
  • 2018-10-07
  • 1970-01-01
  • 1970-01-01
  • 2013-06-02
  • 2014-03-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多