有人看到这个错误,知道该怎么办?
我正在使用终端,我在根目录,GitHub存储库存在,我现在不知道该怎么做.
> git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud) 我正在测试Git和Bitbucket.
我在Bitbucket上创建了一个存储库,并创建了一个repo的本地副本,并将文件提交到它中.我似乎无法将文件从我的本地仓库推送到远程仓库.
这是我正在做的事情:
git clone https://me@bitbucket.org/me/test.git
cd test
touch dummy
git add dummy
git commit dummy -m "my first git commit"
git push
Run Code Online (Sandbox Code Playgroud)
最后一行输出:
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
当我登录Bitbucket时,我看不到我的虚拟文件.
我究竟做错了什么?
编辑:
这样做有效:
git push origin master:master
Run Code Online (Sandbox Code Playgroud)
关于这和简单之间的区别的任何解释git push?
我最近重新安装了Windows并获得了最新版本的git.我在Bitbucket上创建了一个新的回购并运行
git remote add origin https://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git
Run Code Online (Sandbox Code Playgroud)
然后我跑了
git push -u origin --all
Run Code Online (Sandbox Code Playgroud)
但这给了我错误
fatal: could not read Password for 'https://MYUSERNAME@bitbucket.org': No such
file or directory
Run Code Online (Sandbox Code Playgroud)
在我得到一个提示问我的用户名和密码之前,推送工作正常.我已经尝试恢复到Git 1.7.11,但这没有做任何事情.