自动访问 Bitbucket 私人仓库

Automating access to Bitbucket private repo

当我将 git pull origin master 添加到我的私有存储库的自动部署脚本时,出现此错误:

fatal: could not read Password for 'https://someone@bitbucket.org': No such device or address

服务器的 SSH 密钥已被授予访问此 Bitbucket 帐户的权限,那么为什么会产生此错误?

没有看到您的 git pull 命令,我假设您正在使用 git clone https://someone@bitbucket.org/someone/repo.git - 这使用基于 https 而非 ssh 密钥的基本身份验证。使用 https 访问 repo 需要 username/password.

为了使用 ssh key auth,你必须使用 ssh 来访问你的 repo,命令如下:git clone git@bitbucket.org:someone/repo.git