免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9653 | 回复: 0

git客户端无法上传文件 [复制链接]

论坛徽章:
7
操作系统版块每日发帖之星
日期:2015-06-16 22:20:00IT运维版块每日发帖之星
日期:2015-06-17 22:20:00IT运维版块每周发帖之星
日期:2016-01-07 23:04:26操作系统版块每日发帖之星
日期:2016-05-17 06:20:00操作系统版块每日发帖之星
日期:2016-05-21 06:20:00操作系统版块每日发帖之星
日期:2016-07-05 06:20:0015-16赛季CBA联赛之广东
日期:2017-07-13 16:08:03
发表于 2016-06-22 12:50 |显示全部楼层
========================
                   服务器端
========================

[root@localhost git-test]# git init --bare devops.git
Initialized empty Git repository in /opt/git/git-test/devops.git/
[root@localhost git-test]# ls -la
total 12
drwxr-xr-x. 3 apache apache 4096 Jun 22 12:18 .
drwxr-xr-x. 3 root   root   4096 Jun 22 11:47 ..
drwxr-xr-x. 7 root   root   4096 Jun 22 12:18 devops.git
[root@localhost git-test]#
[root@localhost devops.git]# ls -lhtr
total 32K
drwxr-xr-x. 4 root root 4.0K Jun 22 12:18 refs
drwxr-xr-x. 2 root root 4.0K Jun 22 12:18 hooks
drwxr-xr-x. 2 root root 4.0K Jun 22 12:18 info
-rw-r--r--. 1 root root   73 Jun 22 12:18 description
drwxr-xr-x. 2 root root 4.0K Jun 22 12:18 branches
-rw-r--r--. 1 root root   23 Jun 22 12:18 HEAD
-rw-r--r--. 1 root root   66 Jun 22 12:18 config
drwxr-xr-x. 4 root root 4.0K Jun 22 12:18 objects
[root@localhost devops.git]#
-------------------------------------> git版本库已经创建成功


========================
                   客户端
========================

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git
$ git clone http://192.168.88.190/git/git-test/devops.git
Cloning into 'devops'...
Username for 'http://192.168.88.190': china
warning: You appear to have cloned an empty repository.
Checking connectivity... done.

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git
$
-------------------------------------> 客户端可以正常下载git版本库


devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git
$ ls -al
total 4
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:43 ./
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:19 ../
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:41 devops/

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git
$ cd devops

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$ ls -la
total 4
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:41 ./
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:43 ../
drwxr-xr-x 1 devops-win-test01 197121 0 六月 22 12:41 .git/

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$ touch china.txt

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$ git add china.txt

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

        new file:   china.txt


devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$
$ git commit -m "test"
[master (root-commit) 990672f] test
Committer: devops-win-test01 <devops-win-test01>
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, 0 insertions(+), 0 deletions(-)
create mode 100644 china.txt

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$ git push
Username for 'http://192.168.88.190': china
Counting objects: 3, done.
Writing objects: 100% (3/3), 200 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack failed: unpack-objects abnormal exit
To http://192.168.88.190/git/git-test/devops.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'http://192.168.88.190/git/git-test/devops.git'

devops-win-test01@nextop-WINserve MINGW64 /d/china-test-git/devops (master)
$
-------------------------------------> 客户端可以无法正常上传数据



请问大家这是为什么呢?谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

数据风云,十年变迁
DTCC 第十届中国数据库技术大会已启航!

2019年5月8日~5月10日,由IT168旗下ITPUB企业社区平台主办的第十届中国数据库技术大会(DTCC2019),将在北京隆重召开。大会将邀请百余位行业专家,就热点技术话题进行分享,是广大数据领域从业人士的又一次年度盛会和交流平台。与SACC2018类似,本届大会将采用“3+2”模式:3天传统技术演讲+2天深度主题培训。大会不仅提供超100场的主题演讲,还会提供连续2天的深度课程培训,深化数据领域的项目落地实践方案。
DTCC2019,一场值得期待的数据技术盛会,殷切地希望您报名参与!

活动入口>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP