将本地项目部署到gitlab
1.安装git
网址: https://git-scm.com/downloads
2.登录git 创建空工程
创建成功后关注 页面下面的“add/upload file" 部分的git 命令行
3.创建密钥并与gitlab关联
1.桌面右键-》》Git Bash Here 2.参考gitlab下创建的空工程 Git global setup部分依次输入: git config --global user.name “你的用户名” git config --global user.email “你的注册邮箱” ssh-keygen -t rsa -C “你的注册邮箱”  3. 生成成功后: 把id_rsa.pub里的内容粘贴到gitlab密钥SSH key中
上传项目
- 到要上传的文件夹目录下,右键Git Bash Here
- 依次输入gitlab创建的空工程 Git global setup 和 Existing folder or Git repository 部分
问题记录+解决
 2. 进入gitlab项目-设置(setting)-版本库(repo) – 保护分支(把保护的分支选择 unprotected) 3. 远程服务端的用户名和密码与当前系统中git保存的用户名和密码有冲突 需要输入gitlab 登录的用户名和密码
|