我正在尝试遵循这些说明,但最后一步失败了
Git全球设置:
git config --global user.name "Swaroop"<br/>
git config --global user.email "whatever@gmail.com"
创建存储库
mkdir project-1
cd project-1
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@git.myserver.com:uname/project-1.git
git push -u origin master
但它失败了
± |master ✓| → git push -u origin master
fatal: '/home/git/repositories/uname/project-1.git' does not appear to be a git repository
fatal: Could not read from remote repository.
为什么当我明确添加远程原点时,git会查找本地“/ home / git”文件夹?
答案 0 :(得分:0)
可能是/home/git
是git服务器上git用户的主目录。当然,这一切都取决于你的git服务器的设置方式。我按照这些说明设置了git服务器http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server