git的安装使用

来源:互联网 发布:阿里云 个人 编辑:程序博客网 时间:2024/05/20 08:43

安装完Ubuntu后忽然意识到没有设置root密码,不知道密码自然就无法进入根用户下。到网上搜了一下,原来是这麽回事。Ubuntu的默认root密码是随机的,即每次开机都有一个新的root密码。我们可以在终端输入命令 sudo passwd,然后输入当前用户的密码,enter,终端会提示我们输入新的密码并确认,此时的密码就是root新密码。修改成功后,输入命令 su root,再输入新的密码就ok了。

 

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
本篇文章来源于 Linux公社网站(www.linuxidc.com)  原文链接:http://www.linuxidc.com/Linux/2010-12/30386.htm

1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -”命令将环境变量也一起带过去,就象和root登录一样)
本篇文章来源于 Linux公社网站(www.linuxidc.com)  原文链接:http://www.linuxidc.com/Linux/2010-12/30386.htm

 

2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)编辑/etc/sudoers文件。也就是输入命令"gedit /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"www_linuxidc_com ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存退出。
本篇文章来源于 Linux公社网站(www.linuxidc.com)  原文链接:http://www.linuxidc.com/Linux/2010-12/30386.htm

 

 

4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。

本篇文章来源于 Linux公社网站(www.linuxidc.com)  原文链接:http://www.linuxidc.com/Linux/2010-12/30386.htm

 

 

http://blog.csdn.net/mydeman/article/details/7579411  安装git

http://gitolite.com/gitolite/install.html install and setup

 

http://blog.chinaunix.net/uid-20775138-id-3029537.html  win7 下git服务器 客户端

 

 

any unix system

sh

git 1.6.6

perl 5.8.8

openssh 5.0

 

step to install:

login to "git" on the server

make sure  ~/.ssh/authorized_keys  is empty or non-existent

make sure your ssh public key from your workstation has been copied as $HOME/yourName.pub

 

install with following commands:

git clone git://github.com/sitaramc/gitolite

mkdir -p $HOME/bin

gitolite/install -to $HOME/bin

 

finally, setup gitolite with yourself as the administrator:

  gitolite setup -pk yourname.pub

 

if the last command doesn't run perhaps "bin" in not in you "PATH",  you can either add it, or just run:

     $HOME/bin/gitolite setup -pk youname.pub

 

adding users and repos:

don't add new repos or users manually on the server.*  Gitolite users, repos, and access rules are maintained by making

changes to a special repo called "gitolite-admin" and *pushing* those changes to the server/

 

to administer your gitolite installation, start by doing this on your workstation (if you have not already done so):

   git clone git@host:gitolite-admin

 

gitolite/doc/README

 

0 0
原创粉丝点击