Github 推送错误。没有权限

标签 git github

我只是想用这个命令从 Ubuntu 11.10 创建我的第一个 repo:

我正要完成 sudo git push -u origin master

Permission denied (publickey). fatal: The remote end hung up unexpectedly

如何解决这个问题?

我也试过了。即 git push -u origin master。我收到了这个错误。

error: could not lock config file .git/config: Permission denied error: could not lock config file .git/config: Permission denied Branch master set up to track remote branch master from origin. error: unable to create directory for .git/refs/remotes/origin/master error: Cannot lock the ref 'refs/remotes/origin/master'. Everything up-to-date

最佳答案

可以 this有什么帮助吗?

引用:

Did you forget to add your public key to the github project settings? Also check to make sure your private key is in your .ssh directory.

Goto https://github.com/[username here]/[project name here]/edit and make sure your public key is set.

Read this too: http://help.github.com/mac-key-setup/

关于Github 推送错误。没有权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8402281/

相关文章:

java - 为什么我不能将 .jar 添加到 eclipse git repo?

ruby-on-rails - Capistrano 和 Rails 部署,无法从 ubuntu 服务器访问 bitbucket 存储库

apache - 修改 apache 以防止 .git 文件夹的公共(public)可访问性

node.js - 在 git 中处理 node_modules 的正确方法是什么?

amazon-web-services - github 存储库到 AWS,静态网站的简单管道

git - 设置证书验证位置时出错 - Github

git - 源代码管理问题

git - laravel Blade 文件,您的本地更改将被 merge 覆盖

git - 请求的 URL 返回错误 : 403 Forbidden while accessing github. com

r - .Rproj 文件消失,但项目文件保留(git 显示没有更改)