Articles of git

列出linux用户

我需要在Linux中find一个不出现在我的/ etc / groups文件中的组。 我运行以下命令并出现错误 sudo adduser –disabled-login –gecos 'GitLab' git adduser: The group `git' already exists. 但是当我运行下面的命令时,没有组git cat /etc/group | grep git #no results cat /etc/passwd | grep git #no results cat /etc/shaddow |grep git #no results 这是一个全新的Ubuntu 12.04盒子,除了与LDAP绑定外,没有任何变化。 甚至还没有安装vim或git。 为什么我得到了组git已经存在的错误? 有没有什么办法呢? 我想要安装gitlab 。

什么会导致SSH连接失败,当使用`ssh:// user @ hostname`forms,但成功与裸`user @ hostname`?

我试图在我们的办公服务器上build立一个git仓库,并通过使用公钥authentication的SSH来访问它。 我在服务器上创build了一个用户git ,并将两个OpenSSH公钥添加到~/.ssh/authorized_users 。 我可以使用ssh [email protected]成功连接。 当试图连接到ssh ssh://[email protected] ,公钥validation失败,连接回到密码validation; 然而,git用户的密码也不authentication。 尝试从服务器上的其他用户( ssh ssh://git@localhost )进行连接时也是如此。 有谁知道可能导致这种行为的configuration方式? 服务器是运行OSX 10.6.8的Mac Mini,安装了默认的OpenSSH。 /var/log/secure.log中的消息如下所示: $ grep 'sshd' /var/log/secure.log // Accepted connections Accepted publickey for git from xxx.xxx.xxx.xxx port 51818 ssh2 Accepted publickey for git from 127.0.0.1 port 49305 ssh2 // Failed connections Invalid user ssh from xxx.xxx.xxx.xxx in pam_sm_authenticate(): Failed […]

混帐bash更改用户名

我使用的是git bash,它试图使用我的Windows用户名来login“git push origin Dev”,但是我希望它使用不同的名称,我的用户名在远程。 我怎样才能改变这个? 谢谢

如何在RHEL 6中获得yum的“基础”存储库?

我的目标是尝试在RHEL 6机器上安装git。 我在这里看过这篇文章: 我如何在RHEL 6上安装git? 答案是指出现在centOS中的下载链接: http : //mirror.anl.gov/pub/centos/6.3/os/x86_64/Packages/git-1.7.1-2.el6_0.1.x86_64。转 我不愿意使用这样的链接,因为它是一个过时的Git版本,更重要的是,我的印象是,如果我使用Fedora中的某些东西,我可能会从我的机器上的某个错误存储库中打开一个包。 CentOS的。 事实上,我从描述EPEL软件存储库的信息中获得了这种印象。 从http://fedoraproject.org/wiki/EPEL EPEL软件包通常基于Fedora的软件包,不会与基本的Enterprise Linux发行版中的软件包发生冲突或取代软件包。 但是,遵循从链接的serverfault post的总体build议,我需要安装RHEL的“基础”存储库。 我怎样才能做到这一点? 为了什么是值得的,这里是我的“repolist”: $ yum repolist Plugin "product-id" can't be imported Plugin "subscription-manager" can't be imported Loaded plugins: refresh-packagekit, security repo id repo name status epel Extra Packages for Enterprise Linux 6 – x86_64 8,220 repolist: 8,220

Cronjob通过git推MongoDB备份

任务:创build一个每晚执行一次bash脚本的Cronjob。 bash脚本应该做一个mongoDB备份并将其推送到Git Repo。 所以我通过crontab -e命令创build了一个作为root用户的cronjob : #!/bin/bash SHELL=/bin/bash USER=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/root HOME=/root 0 2 * * * /path/script.sh > /path/script.log 这是应该执行的脚本 : BAK="/path" #MONGO="/usr/bin/mongo" #MONGODUMP="/usr/bin/mongodump" #GIT="/usr/bin/git" echo "starting backup" echo $BAK /usr/bin/mongodump –username=myusername –password=mypassword –db=mydatabase –out=$BAK$ echo "backup created" /usr/bin/git add . /usr/bin/git commit -m "backup from `date +'%Y_%m_%d'`" echo "committed" /usr/bin/git push -u origin […]

如何告诉jenkins放弃build立一个特定的SHA?

我使用Jenkins和Git SCM在GitHub上构build项目。 我已经告诉它build立了一个已经被强制推送的分支,现在我的构build失败了,因为每次启动都会尝试构build远程不再存在的提交: 19:30:31 Started by user admin 19:30:31 Building in workspace /Users/Shared/Jenkins/Home/workspace/myproject 19:30:31 [WS-CLEANUP] Deleting project workspace… 19:30:31 [WS-CLEANUP] Done 19:30:31 [ssh-agent] Looking for ssh-agent implementation… 19:30:31 [ssh-agent] Java/JNR ssh-agent 19:30:31 [ssh-agent] Skipped registering BouncyCastle, not running on a remote agent 19:30:31 [ssh-agent] Started. 19:30:31 [ssh-agent] Using credentials git (id_rsa) 19:30:31 Cloning the remote […]

Snow Leopard客户端在Debian上的gitosis服务器出现SSH_ORIGINAL_ENVIRONMENT错误

我有一台服务器在Debian Lenny上运行gitosis(从软件包pipe理器安装)。 我能够从我的Linux mint笔记本电脑执行所有操作,但从我的Mac运行最新的雪豹给我以下错误: mica@waste Desktop$ git clone [email protected]:Poems.git Initialized empty Git repository in /Users/micas/Desktop/Poems/.git/ ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly mica@waste Desktop$ ssh -v [email protected] OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009 debug1: Reading configuration data /etc/ssh_config debug1: Applying options for * debug1: Connecting to 192.168.0.156 [192.168.0.156] port 22. debug1: […]

在服务器上的git钩子和ssh

我有一个服务器上的git回购。 我想在推送完成时运行更新钩子。 我无法得到git revlist或从用户那里获取任何信息,因为我无法启用tty。 我写了python钩子。 我想这样我就可以从我的本地仓库检索提交历史logging,并在更新钩子的过程中使用这些信息,这会在提交中检查模式。 我遇到的问题是,当我从我的脚本运行命令它正在我的服务器上执行。 请任何意见,真的不胜感激。

我有一台运行Windows 2008 R2 Core的服务器,它需要托pipeSVN或GIT

为我们的跨平台项目(包括Mac和PC)源代码库分配的服务器运行Win2008R2 Core。 我们对它的稳定性感到非常满意,我们不想转向非核心。 我们需要以最短的步骤在上述框中安装SVN或GIT。 我们知道这两个系统的优点和缺点。 这就是说,我们不关心我们使用哪一个,我们只是寻找在运行R2核心的机器上设置存储库的阻力最小的path。

Git与密码,而不是公钥

我有一个git服务器运行一个小组进行检查,我想知道是否有一种方法来设置它,使用户可以使用他们的密码login,而不必使用公钥? 谢谢你的帮助!