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

简介: <p><br></p> <p><span style="font-size:14px; color:#ff6666">[root@localhost ~]# sudo -H -u git gitosis-init < ~/id_rsa.pub</span><br> Traceback (most recent call last):<br>   File "/usr/bin/g


[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/


目录
相关文章
|
缓存 开发工具 git
报错:Git上传代码报错 will not add file alias already exists in index
报错:Git上传代码报错 will not add file alias already exists in index
459 0
|
2月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
|
4月前
|
开发工具 git
unable to index file ‘~$git提交版本号.xlsx‘
unable to index file ‘~$git提交版本号.xlsx‘
|
6月前
|
开发工具 git
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
299 1
|
开发工具 git
【git】解决OpenSSL SSL_read: Connection was reset, errno 10054 ...
【git】解决OpenSSL SSL_read: Connection was reset, errno 10054 ...
266 0
|
开发工具 git iOS开发
Mac使用brew install 安装wget工具报错 fatal: not in a git directory Error: Command failed with exit 128: git
Mac使用brew install 安装wget工具报错 fatal: not in a git directory Error: Command failed with exit 128: git
1725 0
Mac使用brew install 安装wget工具报错 fatal: not in a git directory Error: Command failed with exit 128: git
|
开发工具 git
Git冲突:# If this is not correct, please remove the file # .git/MERGE_HEAD
Git冲突:# If this is not correct, please remove the file # .git/MERGE_HEAD
124 0
Git冲突:# If this is not correct, please remove the file # .git/MERGE_HEAD
|
开发工具 git
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
408 0
|
开发工具 git
.git file too large question resolve解决方法
.git file too large question resolve解决方法
|
Linux 开发工具 git
【Git】解决:E:/**/.git/index.lock': File exists
【Git】解决:E:/**/.git/index.lock': File exists
327 0