当我将 git pull origin master 添加到私有仓库的自动部署脚本时,我发出以下错误:
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访问存储库需要用户名/密码 .
git clone https://someone@bitbucket.org/someone/repo.git
要使用ssh key auth,您必须使用ssh为您的repo访问使用如下命令: git clone git@bitbucket.org:someone/repo.git
git clone git@bitbucket.org:someone/repo.git
1 回答
没有看到你的git pull命令,我假设你正在使用
git clone https://someone@bitbucket.org/someone/repo.git
- 这使用基本身份验证而不是https而不是ssh密钥 . 使用https访问存储库需要用户名/密码 .要使用ssh key auth,您必须使用ssh为您的repo访问使用如下命令:
git clone git@bitbucket.org:someone/repo.git