yum -y install curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel gcc cc
yum install -y git
groupadd git
useradd git -g git
passwd git #参数是用户名
gzrb0609
vi /etc/ssh/sshd_config
解开:
1.RSAAuthentication yes
2.PubkeyAuthentication yes
3.AuthorizedKeysFile .ssh/authorized_keys
cd /home/git
mkdir .ssh
chmod 700 .ssh
touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
# su - git //切换git用户
git config --global user.name 'yangc'
git config --global user.email 'yangc@gzrbs.com.cn'
cd ~/.ssh
ssh-keygen -t rsa -C "yangc@gzrbs.com.cn"
authorized_keys
ssh -T -v git@github.com
切换到git用户并创建Git仓库first
git --bare init /home/git/first
eclipse中,windows->preference->team->git->Configuration配置git的基础环境 2.user settings点击add entry在里面添加user.email="注册邮箱";user.name="注册用户名"
针对已有的项目,右键team-share project-create repository,team-commit-commit创建本地仓库。
team-remote-push
host填入10.1.3.42,repository path填入/home/git/first,协议ssh,user:git, password: gzrb0609, source ref master
team-push branch master-remote name gggg
从git导入项目:
file-import-git-projects from git-clone uri
星期四, 05/28/2020 - 16:35 — 杨超