我在UNIX
机器中创建了创建的存储库,
$sudo git --bare init /var/repos/git/repo00001
我还完成了为个人执行的以下命令UNIX users
,
$ git config --global user.email "MyfullName@mindtree.com"
$ git config --global user.name "Anand Sadasivam"
我应该在哪个目录下创建git repsitories
,签入文件时遇到问题。需要为/var/repos/git
我在其下创建 git 存储库的目录设置权限、用户、组。目前它是在root权限下完成的。在UNIX user
使用git
_git init
我观察--bare
到init
在git repository
. 但是当我这样做时,git clone
我的存储库是空的。
由于我使用过--bare
,我可以看到创建的文件夹结构如下,
# ls
HEAD branches config description hooks info objects refs
以下是我git bash client side
在Windows
初始签入某些文件时执行的命令,-Readme.txt
$ git clone anand@xx.xx.xx.xxx:/var/repos/git/repo00001
Cloning into 'repo00001'...
anand@xx.xx.xx.xxx's password:
warning: You appear to have cloned an empty repository.
<<I had created Readme.txt file under the present directory>>
$ git add Readme.txt
$ git status
On branch master
$ git commit -a
[master (root-commit) 8201309] Initial commit
Committer: Anand Sadasivam <MMyEmpID@mindtree.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 1 insertion(+)
create mode 100644 Readme.txt
$ git push origin master
anand@xx.xx.xx.xxx's password:
Counting objects: 3, done.
Writing objects: 100% (3/3), 240 bytes | 120.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: remote unpack failed: unable to create temporary object directory
To xx.xx.xx.xxx:/var/repos/git/repo00001
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'anand@xx.xx.xx.xxx:/var/repos/git/repo00001'
$ git show-ref
82013098f6801ea32bb620b612f779c8dade6d83 refs/heads/master
$ git push origin HEAD:master
anand@xx.xx.xx.xxx's password:
Counting objects: 3, done.
Writing objects: 100% (3/3), 240 bytes | 120.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: remote unpack failed: unable to create temporary object directory
To xx.xx.xx.xxx:/var/repos/git/repo00001
! [remote rejected] HEAD -> master (unpacker error)
error: failed to push some refs to 'anand@xx.xx.xx.xxx:/var/repos/git/repo00001'
是否出现这种情况是因为在安装Windows Settings
时被跟踪。git bash/gui client
或者它完全是repository
权限问题或repository creation user
问题UNIX