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/


目录
相关文章
|
10月前
|
安全 开发工具 git
git添加远程仓库报错To add an exception for this directory解决方案-优雅草卓伊凡
git添加远程仓库报错To add an exception for this directory解决方案-优雅草卓伊凡
870 5
git添加远程仓库报错To add an exception for this directory解决方案-优雅草卓伊凡
|
开发工具 git
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
1194 3
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
|
开发工具 git
unable to index file ‘~$git提交版本号.xlsx‘
unable to index file ‘~$git提交版本号.xlsx‘
|
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
|
开发工具 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.
2429 1
|
开发工具 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
2121 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
287 0
Git冲突:# If this is not correct, please remove the file # .git/MERGE_HEAD
|
开发工具 git
【git】解决OpenSSL SSL_read: Connection was reset, errno 10054 ...
【git】解决OpenSSL SSL_read: Connection was reset, errno 10054 ...
573 0
|
开发工具 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
1164 0
|
开发工具 git
.git file too large question resolve解决方法
.git file too large question resolve解决方法