git gitosis-init OSError: [Errno 2] No such file or directory

[root@localhost ~]# sudo -H -u git gitosis-init < ~/id_rsa.pub
Traceback (most recent call last):
  File "/usr/bin/gitosis-init", line 9, in <module>
    load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
  File "/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/app.py", line 24, in run
    return app.main()
  File "/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/app.py", line 38, in main
    self.handle_args(parser, cfg, options, args)
  File "/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/init.py", line 138, in handle_args
    user=user,
  File "/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/init.py", line 75, in init_admin_repository
    template=resource_filename('gitosis.templates', 'admin')
  File "/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/repository.py", line 63, in init
    close_fds=True,
  File "/usr/lib64/python2.6/subprocess.py", line 478, in call
    p = Popen(*popenargs, **kwargs)
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1238, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

解决:
[root@localhost ~]# yum install python-setuptools
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.skyshe.cn
 * extras: mirrors.skyshe.cn
 * updates: mirrors.yun-idc.com
Setting up Install Process
Package python-setuptools-0.6.10-3.el6.noarch already installed and latest version
Nothing to do
[root@localhost ~]# ln -s /usr/local/bin/git /usr/bin/git
[root@localhost ~]# chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
chmod: cannot access `/home/git/repositories/gitosis-admin.git/hooks/post-update': No such file or directory
[root@localhost ~]# find / -name post-update
/opt/git-2.0.0/gitosis/build/lib/gitosis/templates/admin/hooks/post-update
/opt/git-2.0.0/gitosis/gitosis/templates/admin/hooks/post-update
/opt/git-2.0.0/gitosis/gitosis/test/mocktemplates/hooks/post-update
/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/templates/admin/hooks/post-update
[root@localhost ~]# chmod 755 /usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg/gitosis/templates/admin/hooks/post-update
[root@localhost ~]# sudo -H -u git gitosis-init < ~/id_rsa.pub
Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/

时间: 2024-10-26 20:55:58

git gitosis-init OSError: [Errno 2] No such file or directory的相关文章

RHEL 5.7 Yum配置本地源[Errno 2] No such file or directory

 在Red Hat Enterprise Linux Server release 5.7 上配置YUM本地源时,遇到了"Errno 5] OSError: [Errno 2] No such file or directory xxxx",花了点时间搞清楚错误的来龙去脉.特此记录一下: 将Redhat 5.7的光盘镜像拷贝到了/mnt/cdrom/LinuxSrc目录下,配置了rhel-media.repo文件,如下所示 [root@DB-Server yum.repos.d]# m

Python 3.5 socket OSError: [Errno 101] Network is unreachable

/******************************************************************************** * Python 3.5 socket OSError: [Errno 101] Network is unreachable * 说明: * 在网络状态一切正常的时候没有出现这个问题,当出现比较长时间的网络连接中断 * 的情况下,会出现这个现象,try...except...解决. * * 2017-3-1 深圳 南山平山村 曾剑锋

Git异常:fatal: could not create work tree dir &#039;XXX&#039;: No such file or directory

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥??? 呃(⊙o⊙)-呃(⊙o⊙)- ===> 装逼~ O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的, 如果觉得顿时不开心

CentOS 搭建Git Gitosis 服务器

  环境部署   操作系统:                Centos6.5 x64 Git:                              git-2.0.0 Gitosis:                       Gitosis Gitweb:                       git-2.0.0          OpenSSH Server:     openssh-server-5.3p1 apache:                     httpd

linux下Git+Gitosis+Gitweb组建多用户版本管理

二级域名配置 git.dbpoo.com 指向git repositories这个目录 /mnt/git/repositories gitweb.dbpoo.com 指向 gitweb的目录 /usr/share/gitweb 可以通过apache VirtualHost进行配置 一.安装Git centos6.5自带git1.7.1,通过下边的方法可以升级到1.7.12 1.查看服务器版本(服务器) cat /etc/redhat-release 2.安装RPMForge源并更新git版本(服

storm启动主节点和提交topology时出错 No such file or directory

问题描述 storm启动主节点和提交topology时出错 No such file or directory 运行storm nimbus时出现下面的错误,运行storm jar storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.topology时也出现下面的错误,求大神帮帮忙 fang@fang-OptiPlex-3010:/usr/local/storm-0.8.1/bin$ storm nimbus

python-subprocess模块

一.subprocess 模块简介subprocess模块用来生成子进程,并可以通过管道连接它们的输入/输出/错误,以及获得它们的返回值.它用来代替多个旧模块和函数:os.systemos.spawn*os.popen*popen2.*commands.* subprocess.call(args, *, stdin=None, stdout=None, stderr=None, shell=False)¶subprocess.check_call(args, *, stdin=None, st

python下os模块强大的重命名方法renames

在python中有很多强大的模块,其中我们经常要使用的就是OS模块,OS模块提供了超过200个方法来供我们使用,并且这些方法都是和数据处理相关的,这里介绍下重命名这个方法. OS的重命名方法是os.rename,我用的ipython,这个玩意很是强大,只要按下TAB键,可以帮助我们自动对齐和列出可以使用的方法,发现有2个方法,分别是rename和renames,2个方法,前面的rename使用过无数次,但是后面的renames还没有使用过,今天有空,想看看到底有和用处---顾名思义,我觉得可能是

centos 5 6安装本地yum源

5.7 6.5 试用:  mkdir /opt/mnt mount /dev/cdrom /opt/mnt 配置如下 文件: 备份一下原来文件 cp /etc/yum.redo.d/**.repo  /etc/yum.redo.d/**.repo.bak  vim /etc/yum.redo.d/**.repo 添加: 如下既可 在Red Hat Enterprise Linux Server release 5.7 上配置YUM本地源时, 遇到了"Errno 5] OSError: [Errn