简体   繁体   English

Bitbucket 推送到现有仓库时:致命:无法分叉

[英]Bitbucket when pushing to existing repo: fatal: unable to fork

I'm trying to connect my site to existing git repo, where i've added commits before from local project (not via ssh from server).我正在尝试将我的站点连接到现有的 git 存储库,我之前从本地项目添加了提交(不是通过服务器的 ssh)。 I'm kinda noob with git, but here's what i'm doing on server:我对 git 有点陌生,但这是我在服务器上所做的:

git remote add origin "my bitbucket ssh url here"
git add --all
git commit -m "production"
git push -f origin master

And after this i'm getting this error在此之后我收到此错误

fatal: unable to fork

What am I doing wrong?我究竟做错了什么? Fetching also gives such error.获取也给出了这样的错误。 Adding upstream also doesn't help.添加上游也无济于事。

The server machine has no authorization to talk to your bitbucket repo.服务器机器无权与您的 bitbucket 存储库对话。 This is an ssh URL, so your server machine needs to do what you did on your local machine: create an ssh public-private key pair, and then hand the public key to bitbucket.这是一个 ssh URL,所以你的服务器机器需要做你在本地机器上做的事情:创建一个 ssh 公私钥对,然后将公钥交给 bitbucket。

Update your repo list and install openssh-server更新你的 repo 列表并安装 openssh-server

$apt-get update
$apt-get install openssh-server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM