【问题标题】:How do I upload a django project to github? [duplicate]如何将 django 项目上传到 github? [复制]
【发布时间】:2020-06-14 06:58:21
【问题描述】:

这可能是堆栈溢出有史以来最愚蠢的问题......但我花了将近一个小时尝试这个,但没有运气,并且正在考虑注册 BitBucket。

1) 拖放到 github,不会上传整个文件夹,而是上传大约 30 个 .py 文件中的 5 个,并且不包括任何 html、css 等...并且不保留任何层次结构仅包含 .py 文件

2)命令行:拥有git commit我的文件夹,我尝试git push origin并遇到此错误:


git@github.com:权限被拒绝(公钥)。致命:无法从远程存储库读取。

请确保您拥有正确的访问权限并且存储库存在。


我不知道这意味着什么......

【问题讨论】:

  • 我想你已经运行 git remote add origin git@github.com:[user]/[repo].git 进行尝试 2?该错误是身份验证错误。您可以检查您是否设置了 ssh(公钥)身份验证,并在此处阅读更多信息github.com/settings/keys
  • 您的公钥似乎有问题。在谷歌上搜索并排序。您也可以克隆您的目录,然后在其中添加文件,然后提交并推送它
  • 我推荐阅读 Github 教程:Getting started with Git and GitHub

标签: django git github repository


【解决方案1】:

你是否使用 'git init' 来初始化 repo?你从git remote - v得到什么?

编辑

这个 atlassian doc migth 帮助: https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html

【讨论】:

    【解决方案2】:

    你在 github 上创建了一个 repo 吗? 您需要:

    • 添加更改的文件
    • 提交您的更改
    • 推送到远程仓库

    https://help.github.com/en/github/getting-started-with-github

    【讨论】:

      猜你喜欢
      • 2021-05-11
      • 2013-07-07
      • 1970-01-01
      • 1970-01-01
      • 2015-08-31
      • 1970-01-01
      • 2016-01-15
      • 2021-06-05
      • 2018-08-16
      相关资源
      最近更新 更多