gitlab图形化界面使用

gitlab使用

创建用户


上面是创建用户基本操作

  • 修改密码

创建组

  • 给组添加用户

创建项目

  • 选择空白项目

退出root用户,切换其他用户

在服务器上创建ssh密钥 使用ssh-ketgen 命令 新服务器上创建的

shell 复制代码
[root@gitlab ~]# ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:n/V2kCiwwm2UfBsnQLm17eXUCBiBByyPbefmz5oQvfU root@gitlab
The key's randomart image is:
+---[RSA 2048]----+
|       o++o+     |
|      ..+o+ .    |
|       ==++o.. o |
|     ..o==o=..+..|
|      o.So+.++o  |
|       o oo*.o.. |
|        .o+   E .|
|         ..o . . |
|          ooo    |
+----[SHA256]-----+
[root@gitlab ~]# cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSG2nlniwWPrHMofbiFoc10awxYR7iMyuzG/3y2+wiY1i3IoO4Gz6qe2nQHK9uC0T30R9y2MtMpSnpcV1SMKqiIVR19FhHPU+8hgu3tKu6wQBy51pDj9sMF7jqbt2MVqUZtbEoFZT1f3mRQGGPAU5Z66Bysd7yxbNs1YfvfhPW/x1ghyQ8SwsEGsRdPGY4TrTnCXG5S7XaaWZ7JQYRbDEKT3WrQXBSv6VHV3tJ4UAcfkaN6TGyXnVRmSdm6pwcdKXVHkV9iHO+wNaxTrxxP7TWT8IIXBWoM5EZGeJ7JGa0//7faHKD0FOG0c6O37vT0s+Iv6tKKoZkTQxNLr4Y2mtr root@localhost.localdomain
  • 将上面的复制到下面
  • 相当于做身份验证
shell 复制代码
# 安装
[root@localhost ~]# yum install git -y
[root@localhost ~]# git config --global user.name "lin"
[root@localhost ~]# git config --global user.email "2@qq.com"
[root@localhost ~]# git config --global color.ui true
[root@localhost ~]# git config --list\
> ;
user.name=lin
user.email=2@qq.com
color.ui=true
[root@localhost ~]#  git clone git@192.168.10.128:haidi/ddv.git   # 仓库地址是自己的
  • 添加文件
shell 复制代码
[root@localhost ~]# cd ddv
[root@localhost ddv]# echo '我是开发java' > java.jsp
[root@localhost ddv]# git branch java
[root@localhost ddv]# git checkout
[root@localhost ddv]# git branch
  java
* main
[root@localhost ddv]# git checkout java
切换到分支 'java'
[root@localhost ddv]# git branch
* java
  main
[root@localhost ddv]# git add .
[root@localhost ddv]# git commit -m "first";
[java 0cd745a] first
 1 file changed, 1 insertion(+)
 create mode 100644 java.jsp
[root@localhost ddv]# git status
# 位于分支 java
无文件要提交,干净的工作区
[root@localhost ddv]# git push    origin  java
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 276 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: 
remote: To create a merge request for java, visit:
remote:   http://192.168.10.128/haidi/ddv/-/merge_requests/new?merge_request%5Bsource_branch%5D=java
remote: 
To git@192.168.10.128:haidi/ddv.git
  • 可以看见当前提交的分支
  • 合并分支
  • 添加信息

同意合并 - 使用 wang 用户

可以查看到main分支中看到对应的文件

相关推荐
雯宝7 分钟前
3. 驱动框架(块设备)
linux
静止了 所有的花开31 分钟前
Ubuntu 26.04 静态 IP 配置不生效解决方法
linux·ubuntu·静态ip
caimouse2 小时前
ReactOS 图形系统分析(3):显示驱动 DDI framebuf.dll
linux·运维·网络
小弥儿2 小时前
GitHub今日热榜 | 2026-08-14:OSINT情报工具回流,本地AI赛道升温
人工智能·学习·开源·github
TonyLee0173 小时前
Claude Code + DeepSeek:服务器安装与使用笔记
linux·服务器·deepseek·claude code
buhuizhiyuci3 小时前
【Linux 篇】数字世界的水流蓄水池 —— IO 缓冲区机制深度实战解析
linux·运维·服务器·c++
骇客野人3 小时前
Linux 服务器 Python 版 MCP 服务部署整体方案(适配 Claude/Cursor/自研Agent)
linux·服务器·python
天疆说4 小时前
04 稳定性与性能调优实录:OOM 崩溃、并发槽位、前缀缓存与 DSpark 调参
linux·运维·缓存
星卯教育tony4 小时前
NOI Linux 2.0 服务器多用户网页桌面部署方案(腾讯云轻量Ubuntu20.04专属版 CSP复赛比赛环境搭建免安装虚拟机 )
linux·服务器·腾讯云
极小狐4 小时前
极狐GitLab 补丁版本:19.2.1、19.1.3、19.0.5
网络·安全·gitlab·极狐gitlab·安全更新·补丁版本