风满袖 發表於 2020-10-15 14:22:00

idea配置gitee(转载)

<div id="content_views" class="markdown_views prism-tomorrow-night">
                  <svg xmlns="http://www.w3.org/2000/svg" style="display: none">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0)"></path>
                  </svg>
                  <h4>安装git</h4>
<p>首先先安装git本地工具:点击这里</p>
<p>根据需要选择版本:<br> <img src="https://img-blog.csdnimg.cn/20200530092159571.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 安装成功后,在桌面鼠标右键就会看见Git Bash和Git GUI,打开Git Bash,进入bash界面。<br> <img src="https://img-blog.csdnimg.cn/20200530092336987.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
<h4>注册邮箱</h4>
<p>在git bash界面输入如下内容即可完成邮箱的注册:</p>
<pre class="prettyprint"><code class="has-numbering" style="position: unset"> $ git config --global user.name "user.name"
<div class="hljs-button {2}" data-title="复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4259&quot;}"></div></code><ul class="pre-numbering" style=""></ul></pre>
<p>(说明:双引号中需要你的用户名)</p>
<pre class="prettyprint"><code class="has-numbering" style="position: unset"> $ git config --global user.email "你的邮箱"
<div class="hljs-button {2}" data-title="复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4259&quot;}"></div></code><ul class="pre-numbering" style=""></ul></pre>
<p>说明: 双引号中需要输入你的有效邮箱)</p>
<h4>创建ssh keys</h4>
<pre class="prettyprint"><code class="has-numbering" style="position: unset">$ssh-keygen -t rsa -C "你的邮箱"
<div class="hljs-button {2}" data-title="复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4259&quot;}"></div></code><ul class="pre-numbering" style=""></ul></pre>
<p>大概会确认3次,直接确认即可;</p>
<p>就会在你的<code>C:\Users\你的主机名\.ssh</code>产生下面两个文件:</p>
<p><img src="https://img-blog.csdnimg.cn/20200530092926762.png" alt="在这里插入图片描述"><br> 第一个是产生的密钥,第二个是公钥。</p>
<h4>链接远程</h4>
<p>首先我们需要注册一个gitee账户,邮箱用你上面用的邮箱:点击这里</p>
<p>如果网络可以的话可以操作github,方法大致不差。</p>
<p>注册完,进入界面,点击我的下面的设置:<br> <img src="https://img-blog.csdnimg.cn/20200530093504730.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 点击ssh公钥:<br> <img src="https://img-blog.csdnimg.cn/2020053009355723.png" alt="在这里插入图片描述"><br> 就进入下面界面:<br> <img src="https://img-blog.csdnimg.cn/20200530093850387.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 注意:标题是你自己取得。</p>
<p>下面你可以用编辑器将本地文件<code>id_rsa.pub</code>打开复制其内容,也可以在git控制台写入下面这句命令:</p>
<pre class="prettyprint"><code class="has-numbering" style="position: unset">cat ~/.ssh/id_rsa.pub
<div class="hljs-button {2}" data-title="复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4259&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgba(153, 153, 153, 1)">1</li></ul></pre>
<p><img src="https://img-blog.csdnimg.cn/20200530094448904.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 然后将下面内容复制,粘贴到gitee页面公钥栏里:<br> <img src="https://img-blog.csdnimg.cn/20200530094645581.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 点击确认就可以了。</p>
<h4>配置idea</h4>
<p>在file-&gt;settings-&gt;plugins 里面搜索gitee,点击安装:<br> <img src="https://img-blog.csdnimg.cn/20200530094935256.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 如果你的搜索不出来你可以试试使用手机开个热点,搜索,我的就是连上宽带搜不出来,但是手机的网可以。</p>
<p>点击安装,安装完成之后点击:<code>Version Control</code><br> <img src="https://img-blog.csdnimg.cn/20200530095716491.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 在这需要配置git、gitee,如果你的是github就配置github不用配置gitee.</p>
<p>点击git,选择我们之前安装的git目录下的cmd下的git.exe就可以了<br> <img src="https://img-blog.csdnimg.cn/20200530095859199.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 点击aplay,然后配置gitee:<br> <img src="https://img-blog.csdnimg.cn/20200530100205351.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 注意:点击+然后输入你的账户密码,注意要选择<code>Clone git repositories using ssh</code>点击aplay就可以使用了。</p>
<h4>上传项目到gitee</h4>
<p>首先新建一个空项目,然后创建本地仓库:<br> <img src="https://img-blog.csdnimg.cn/2020053010081568.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 将项目上传到本地仓库:<br> <img src="https://img-blog.csdnimg.cn/2020053010114937.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 提交上传:</p>
<p><img src="https://img-blog.csdnimg.cn/20200530101349629.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 现在是添加到本地了,下面分享到gitee网页:<br> <img src="https://img-blog.csdnimg.cn/20200530102349790.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 点击分享:<br> <img src="https://img-blog.csdnimg.cn/20200530102415169.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 就完成了上传。</p>
<h4>更新项目</h4>
<p>我们在上传后代码改动他会显示蓝色,代表可以更新上传,创建新的文件事,他会提示你要不要加入仓库,根据你的需要,如果你需要上传的话就添加,如果不需要就不添加,要更新的时候,使用Ctrl+K:</p>
<p><img src="https://img-blog.csdnimg.cn/20200530103235189.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br> 点击commit and push会在更新本地的时候上传gitee更新项目:<br> <img src="https://img-blog.csdnimg.cn/20200530103349771.png" alt="在这里插入图片描述"><br> 点击上传:<br> <img src="https://img-blog.csdnimg.cn/20200530103441286.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JpbmdfYmc=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
                </div><br><br>
来源:https://www.cnblogs.com/jyxqclzx/p/13820338.html
頁: [1]
查看完整版本: idea配置gitee(转载)