我正在使用git post-update挂钩通过sudo运行一个命令,而我得到这个错误: sudo: sorry, you must have a tty to run sudo 。 我相信我需要修改/etc/sudoers但我不知道该怎么做。 任何帮助,将不胜感激!
我在服务器上安装gitolite3,用ssh和http拉/推/ alltherest。 在此过程中,创build了一个用户和组gitolite3。 当我运行: $ ssh gitolite3@server info 我用RW repo信息得到正确的gitolite3消息。 麻烦的是,我想要通常的用户git,而不是繁琐的gitolite3,没有把它分开。 其他一些线程提到创build用户git与相同的uid ang gid,但是这不会给出与上面相同的结果。 当我login(使用传统的graphicslogin屏幕),有我通常的pipe理员用户,并以某种方式gitolite3用户名(但我不知道这是否是我创build的gitolite3或git用户别名)。 我如何创buildgit用户/replacegitolite3用户,以便ssh git @ server info与gitolite3一起使用? 什么决定了什么时候用户可以login使用login屏幕,以及如何closures?
我花了几天的时间尝试在我的服务器上build立一个Git Remote,所以我可以把更改到我的Web服务器上。 问题是我在做这件事时遇到以下错误: $ git push –porcelain –progress –recurse-submodules=check live refs/heads/master:refs/heads/master 'master' pushed: d689cce..4e755fc Delta compression using up to 4 threads. Total 3 (delta 2), reused 0 (delta 0) remote: error: unable to create file .gitignore (Permission denied) remote: error: unable to create file .gitignore~ (Permission denied) remote: error: unable to create file index.js (Permission […]
我将在我的学校创build一个gitlab服务器来承载类代码。 我希望这样做,每当任何用户推到gitlab它自动部署项目到/var/www/gitdeploy/<repo-user>/<repo>/<branch> ,以这样一种方式, http://<myServer>/gitdeploy/<repo-user>/<repo>/<branch> 。 最好是部署所有分支机构,但至less主人会没事的。 所有这些将在同一台服务器上运行。 我听说过Gitlab CI,但不确定是否适合我,而且我也不知道如何设置它。 我怎么能这样做? 编辑:另外,我想我应该指定,我希望它的所有用户,希望没有我configuration为每个用户,冰环球
好奇哪个来源回购是更有效率的方面使用服务器资源,混帐或svn?
我正在寻找一个类似向导的GUI界面来创build一个中央存储库Git,可供多个用户进行身份validation。 有没有任何一个简单的设置窗口或Linux中央存储库的GUI? 也许一个gitosisgraphics用户界面的前端?
有谁知道PHP的类似Heroku的服务(阅读:Symfony 1.4,PHP 5.3+),我可以使用git(集线器)来pipe理部署?
我很难configurationJenkins,作为Windows服务运行,连接到git服务器(gitosis)并克隆存储库。 jenkins被设置为使用标准的Git插件 。 一切都由我们托pipe:Jenkins服务器在win.foo.com ,gitosis在linux服务器( git.foo.com )上运行。 如果我将RDP放入win.foo.com我可以win.foo.com克隆( git.exe clone –progress -o origin [email protected]:myproject.git myproject ),而不会出现问题。 Jenkins作为服务运行,并且因为它没有在同一用户帐户下运行,所以我已将.ssh文件夹复制到%SystemRoot%\System32\config\systemprofile (在%USERPROFILE%环境variables中定义)和C:\Program Files (x86)\Git\ ,但这些似乎都没有拿起由jenkins,即使完全重新启动。 我试过使用git.exe和git.cmd ; 两种情况都没有喜乐。 Jenkins失败,并显示以下错误消息: ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]:myproject.git ERROR: Cause: Error performing command: C:\Program Files (x86)\Git\cmd\git.cmd clone –progress -o origin [email protected]:myproject.git C:\Program Files (x86)\Jenkins\jobs\myproject\workspace Command "C:\Program Files […]
我相信我错过了一些常用的git插件,例如gitk ,我怀疑这是因为我安装了git sudo yum install git 作为该包列表的信息: : The git rpm installs the core tools with minimal dependencies. To : install all git packages, including tools for integrating with : other SCMs, install the git-all meta-package. 好的。 我想安装git-all meta-package。 然而,我天真的尝试这样做,用sudo yum install git-all告诉我没有包git-all 。 这是我的百胜repolist: repo id repo name status epel Extra Packages for Enterprise […]
设置使用git部署到服务器的生产Web服务器的用户和权限的最佳方法是什么? 背景 运行Ubuntu 12.04,我在/var/www下将Apache服务文件作为www-data 。 我在root用户目录下也有一个纯粹的git repo,它将在post-receive hook中检出到/var/www/example.com 。 这工作得很好,但考虑到它是一个生产服务器,我想扣上一些安全性,并从根用户删除回购。 所以我创build了一个git用户,并在/home/git下设置了repo。 但现在我有权限问题的事实,一个用户拥有回购,而另一个用户拥有网站的根。 我在网上阅读了很多论坛和教程。 大多数似乎只是使用root用户,其他人似乎有更糟糕的安全问题(如通过回购给www-data读取权限)。 我正在寻找真实世界的经验,因为有很多方法可以做到。 作为一个说明,后接收钩不仅仅是结帐。 它还执行一些构build过程,如运行Composer和一些其他的PHP脚本,可能需要几分钟的时间。 我尝试了几个解决scheme: 我尝试将git用户添加到www-data group ,然后将web根目录重新命名为www-data 。 这有两个问题。 首先,我必须修改sudoers文件,我从中得到的结果是碰撞和错过。 其次,在钩子运行的几分钟内,检出的文件由git拥有,而不是www-data ,因此站点上的用户可能会读取错误。 我试着把post-receive的内容放在另一个文件中,然后用sudo执行。 同样,这需要编辑sudoers文件,以便git用户可以不使用密码sudo。 或者,可能是将根目录下的回购权限放在了较小的位置,我无所作为。 有没有更好的解决scheme,我还没有尝试过?