下载rpm包 rpm安装包下载urlhttps://packages.gitlab.com/gitlab/gitlab-ce 下载的rpm包名如:gitlab-ce-14.6.2-ce.0.el7.x86_64.rpm rpm安装 上传到服务器上之后使用root用户或者sudo命令运行如下命令: sudo rpm -ivh gitlab-ce-14.6.2-ce.0.el7.x86_64.rpm warning: gitlab-ce-14.6.2-ce.0.el7.x86_64.rpm: Header V4 RSA…

2022-01-13 0条评论 740点热度 0人点赞 王显锋 阅读全文

原文链接 Git提交记住用户名和密码 git清除用户名密码 Git提交记住用户名和密码 Https记住密码 永久记住密码 git config --global credential.helper store 会在用户主目录的.gitconfig文件中生成下面的配置。 [credential] helper = store 如果没有--global,则在当前项目下的.git/config文件中添加。 当然,你也可以直接复制上面生成的配置到配置文件中。 临时记住密码 默认记住15分钟 git config –glob…

2018-08-10 0条评论 9290点热度 1人点赞 王显锋 阅读全文

从GitLab上pull项目 今天从GitLab上pull项目的时候出现了一个错: $ git pull origin master remote: Counting objects: 369, done. remote: Compressing objects: 100% (116/116), done. error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054 fatal: The remote end hung up…

2018-07-14 0条评论 10974点热度 0人点赞 王显锋 阅读全文

GitLab 首先在GitLab上创建项目,创建项目完成之后有个项目的git地址,如: https://gitlab.com/wangxianfeng/ssh-scripts.git 如果要把本地已经存在的目录提交到该项目上需要做的操作如下: 在本地进入命令行,切换到想要提交的目录,按照以下命令执行: cd existing_folder git init git remote add origin https://gitlab.com/wangxianfeng/ssh-scripts.git git add . …

2018-07-13 0条评论 1803点热度 0人点赞 王显锋 阅读全文

已有项目介绍 比如已经有了一个名叫util的项目,默认推送到origin的远程仓库上,git的config配置类似如下: [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = ssh://wangxianfeng@aiuyo.com:58922/volume1/homes/wa…

2018-04-27 0条评论 2565点热度 1人点赞 王显锋 阅读全文

原文链接:github总结(4)--关于git reset --hard这个命令的惨痛教训 背景叙述: 前几天,上传自己的个站到git上的时候,手欠脑发晕的用了次git reset --hard xxxxxx 命令。由于只在线上传入了一个index.html页面(自己都不知道自己咋想的,就这么干了,O__O"…),且第一次commit的时候也只commit了一个index.html文件,其他文件的只是通过git add --all命令进行本地追踪。 然后,突发奇想,想恢复到第一次提交的时候(天知道当时自己咋想的)!…

2017-09-02 0条评论 1940点热度 0人点赞 王显锋 阅读全文

首先建立版本库服务端仓库 mkdir ~/gitrepositorys/document git init --bare 到document目录添加地址 git remote add origin ssh://wangxianfeng@192.168.2.99:922/volume1/homes/wangxianfeng/gitrepositorys/document/.git 推送即可 git push origin master

2017-09-02 0条评论 1085点热度 0人点赞 王显锋 阅读全文

新建repository 本地目录下,在命令行里新建一个代码仓库(repository) 里面只有一个README.md 命令如下: touch README.md git init 初始化repository git add README.md 将README.md加入到缓存区 (可以用git add --a将所有改动提交到缓存(注意是两个杠))   git commit -m "first commit" 提交改变,并且附上提交信息"first commit"   Push   git re…

2017-06-26 0条评论 1077点热度 0人点赞 王显锋 阅读全文