无法在github中发布项目

无法在github中发布项目,git,github,bitbucket,Git,Github,Bitbucket,早些时候,我曾使用bitbucket.org。但这对我不起作用,因为我无法推进我的Django项目。每当我发出命令时: git push -u origin master git@bitbucket.org: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the rep

早些时候,我曾使用bitbucket.org。但这对我不起作用,因为我无法推进我的Django项目。每当我发出命令时:

git push -u origin master   

git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
git remote add origin https://sandywandy@bitbucket.org/sandywandy/blog-app.git
无法理解我哪里出错了。
使用以下命令完美创建了回购协议:

git push -u origin master   

git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
git remote add origin https://sandywandy@bitbucket.org/sandywandy/blog-app.git
什么都没用。在这里发布查询。谁也帮不了我。现在我转到github.com。同样的问题还在困扰着我。令人惊讶的是,当我使用GitHub的命令时,bitbucket仍然会出现错误。

如果有人有任何解决方案,请提供帮助。

因为您使用的是HTTPS,请检查您是否有可能为您的私人回购缓存了错误密码的密码:

git config credential.helper
您可能必须删除缓存的凭据(如图所示,或)

注意:git remote add只需在本地repo中声明repo URL。
它不会“创建”远程回购协议

检查git remote-v的输出:如果它是一个ssh URL(比如
git@bitbucket.org:…
),将其更改为https:

git remote set-url origin https://sandywandy@bitbucket.org/sandywandy/blog-app.git
就你而言:

git remote set-url origin https://sandywandy@bitbucket.org/sandywandy/blog-app.git
git push -u origin master

你在什么操作系统上运行Git?Windows、Linux或Mac OS您的计算机上是否下载并安装了git?是的,一切都完成了。它显示git版本2.17.1I正在使用Ubuntu Linux。错误消息表明删除服务器拒绝了您的ssh密钥。在bitbucket上执行任何需要执行的操作,以正确设置当前ssh密钥。@SandipNath您可以在Git repo文件夹中尝试:
Git remote set url origin吗https://sandywandy@bitbucket.org/sandywandy/blog app.git
,然后
git-push-u原始主机
哦,太棒了!!!非常感谢VonC。它现在的工作方式应该是这样的。“你真是一位大师级的巫师。”桑迪普纳特太棒了!做得好。我已经在答案中包含了这些命令,以提高可见性。别忘了读书