- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
今天我启用了 Gitlab 的第二因素身份验证。之后,因为我登录了Gitlab网站,我需要用我的手机传递一个6位数字加上我的密码,这样很好,让我感到安全。
但是,当我使用一般操作时,例如git clone some-repo.git
,我得到了错误:
Cloning into 'some-repo'...
remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'api' scope for Git over HTTP.
remote: You can generate one at https://gitlab.com/profile/personal_access_tokens
fatal: Authentication failed for 'some-repo.git'
然后我尝试使用 git pull
现有克隆的本地 repo,出现同样的错误。在启用第二因素身份验证之前,上述所有操作都运行良好。
按照上面的错误提示,我去了上面提到的地址:https://gitlab.com/profile/personal_access_tokens .我创建了以下 token ,并保存了 token 的 key 。
但是,我不知道如何使用这把 key 。谁能告诉我如何使用此 key 启用基本操作,如 git pull
、git clone
、git push
等...
在启用第二因素身份验证之前,我在本地有很多 repo 协议(protocol)。我也希望这些能起作用。
最佳答案
如 using gitlab token to clone without authentication 中所述,您可以像这样使用您的个人访问 token 克隆 GitLab 存储库:
git clone https://oauth2:ACCESS_TOKEN@gitlab.com/yourself/yourproject.git
至于如何更新现有克隆以使用 GitLab Personal Access Token,您应该在每个本地 git 目录中编辑 .git/config
文件,该文件将包含如下条目:
[remote "origin"]
url = https://yourself@gitlab.com/yourself/yourproject.git
更改url
:
[remote "origin"]
url = https://oauth2:ACCESS_TOKEN@gitlab.com/yourself/yourproject.git
现在您可以像启用 2FA 之前一样继续使用这个现有的 git 克隆。
关于git - 开启gitlab二次验证后如何使用git命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51658549/
本地帐户 从关于核心数据和iCloud的WWDC 2013 207 session中: You provide us a single store URL inside the application
我正在尝试快速打开一个类型。我不是要打开对象实例的类型,而是要打开实际类型本身。例如: let t: Any.Type = Int.self switch t { case is Int:
上一节主要是简单地说了一下关于yii2的防御csrf的攻击机制,接下来说一下关于如何全局和局部的开启使用csrf。 (1)全局使用,我们直接在配置文件中设置enableCookieValidati
apache往nginx去转,代码端用到了$_SERVER['PATH_INFO'],对于nginx默认是不开启pathinfo的。所以我们就要手动开启 1,url重写
我有什么 我有两个房间:rm_home和rm_options。我有声音:snd_Bgm。而且,我有三个对象:obj_bgm,obj_BtnOnClicked和obj_BtnOffClicked。 我想
我需要 JQuery 方面的帮助,我是编程的初学者。 我需要的是当我点击一个特定的按钮时,描述会出现,但是当我点击一个按钮时它们会同时出现。请帮助。谢谢 :) $(document).ready(
我的 Linux 服务器有问题。 配置:Linux 服务器 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u2 i686 Apache/2.2.22 (Debi
我有一个应用程序可以在 Activity 中保存帖子信息。在此 Activity 中,相关帖子列在帖子底部。用户通过点击相关帖子可以转到帖子 Activity 并查看该帖子信息和相关帖子。 如您在图片
当我点击屏幕上的“编辑”按钮时,我将 TableView 更改为编辑模式,并将编辑样式设置为复选框 func tableView(_ tableView: UITableView, editingSt
我使用这个 fanotify 示例来监控整个文件系统的打开/访问权限 (/):http://git.infradead.org/users/eparis/fanotify-example.git .
当我在我的 linux 控制台上为我键入的每个命令打开 bash -x 时,我得到了这个输出。 printf "\033]0;%s@%s:%s\007""${USER}""${HOSTNAME%%.*
本文实例讲述了mysql慢查询操作。分享给大家供大家参考,具体如下: mysql有些sql会执行很慢,有可能造成服务器负载飙升 首先查询 确定影响负载的是mysql ,使用top命令,ps命令等
我是 FFMpeg 的新手,所以这可能是一个愚蠢的问题,但我在文档中看不到答案。 我想从 DVD vob 文件中解码帧。打开组中的第一个 VOB 工作正常,但我如何告诉 ffmpeg 继续到下一个 V
我改变了创建数据表的方式,因为我想要动态创建列。我的数据表有一列用于披露详细信息。 function format (d) { console.log(d); var ou
如何从弹出页面 backingbean 获取 backingbean 内容到父 Window.Opener 页面? 最佳答案 您需要手动填写 window.opener通过 JavaScript 的输
我有一个指令在它的 link 函数中做这样的事情 angular.module('myApp') .directive('barFoo', function() { retur
我刚收到一封来自 Authorize.net 的电子邮件,通知他们使用 TLS1.0 和 TLS1.1 停用与其服务器的连接。 问题是 Godaddy SSL 和 Web 主机设置为 TLS1.2 连
由于我的项目太大,我需要运行proguard才能成功编译android。 但是当我设置 android:debuggable="true"以便我轻松调试时,它会自动关闭 proguard。有什么解决方
因此,我已经实现了新的 Fused Location Provider API 来获取用户的位置,但出于某种原因,除非打开 GPS,否则我无法获取任何位置。并非总是如此,用户会打开他们的 GPS,我不
我正在尝试在 Spring Boot 中启用 @GlobalMethodSecurity 以使用 CustomPermissionEvaluator。因此,我添加了相应的 MethodSecurity
我是一名优秀的程序员,十分优秀!