Git访问TFS出现权限不足(Using Personal Access Tokens to access Visual Studio Online)

使用GIT克隆TFS服务器上的代码到本地时出现错误如下:

fatal: Authentication failed for ‘https://***.visualstudio.com/***Project/_git/***/‘

解决办法:

原文请查看(https://roadtoalm.com/2015/07/22/using-personal-access-tokens-to-access-visual-studio-online/)

People who use Visual Studio Online for a while are probably familiar with the alternate credentials. These are used when accessing the REST API or when using an external client for accessing your Git repositories.

You configure your alternate credentials on your [My Profile] page and fill a username and password of your choice.

Once you enable your credentials, you can use these credentials when doing a REST call or (easier to test) clone a Git repository

This is great but not the most secure way of doing things.

Personal Access Tokens

In the update of July 7th, we now have the ability to use Personal Access Tokens as an alternative to the Alternate Credentials. Instead of sending our username and password over the wire we an now use a secure token that we can scope to a timeframe and to functionality within VSO. On the [My Profile] page you can configure one or more Personal Access Tokens. For example a token to access Code Features.

When you create the token, you see a token (only visible after creation !) that you should copy and keep safe.

This token alone is sufficient to authenticate against VSO. So when you now clone a Git repository you only have to fill in this token in the password box. Username can be empty or any value

The great thing is that you can revoke rights or the token afterwards and make sure that people cannot access stuff anymore.

Hope this helps!

时间: 2024-08-30 05:59:46

Git访问TFS出现权限不足(Using Personal Access Tokens to access Visual Studio Online)的相关文章

ubuntu Gitolite管理git server代码库权限

公司代码库用Git,全部用SSH认证,多个代码库多个用户,权限管理是个头疼的问题,今天终于有空测试下Gitolite, Gitolite是在Git之上的一个授权层,依托sshd或者httpd来进行认证.(概括:认证是确定用户是谁,授权是决定该用户是否被允许做他想做的事情). Gitolite允许你定义访问许可而不只作用于仓库,而同样于仓库中的每个branch和tag name.你可以定义确切的人(或一组人)只能push特定的"refs"(或者branches或者tags)而不是其他人.

为Kubernetes dashboard访问用户添加权限控制

为Kubernetes dashboard访问用户添加权限控制 [TOC] 1. 需求 在开发环境给开发人员创建应用部署管理权限,可以使用dashboard的token和kubeconfig文件登录,并在开发人员机器上安装kubectl命令,可以使用kubectl port-forward命令. 2. 方案 因为我们用到了dashboard和kubeapps,所以他们的rbac权限都要分配. 创建namespace:dev 创建ServiceAccount:dev-user1 给相应权限,并绑定

解决WCF部署到IIS出现“证书必须具有能够进行密钥交换的私钥,该进程必须具有访问私钥的权限”

访问WCF服务时,出现异常详细信息: System.Security.Cryptography.CryptographicException: 密钥集不存在.ArgumentException: 证书“CN=MyServerCert”必须具有能够进行密钥交换的私钥.该进程必须具有访问私钥的权限.这个问题是因为 WCF 所使用的帐户(NETWORK SERVICE/ASPNET)对证书私钥文件的读访问权限造成的. 造成上面的错误主要是Network Service(Server)用户没有访问证书权

[转载] 使用Gitolite来对Git的repository实现权限控制

我们项目组打算从svn向git迁移,前几天我搭建了git环境,把代码从svn转移过来,然后所有成员都通过server上的git账号来做pull和push,一切都安置妥当,没有问题.但是后来其它项目组也打算使用这个git server,那么问题来了,之前那种授权的方式肯定是不够的,因为只要能连上server,那么他对这个server上所有的repository都有完全的读写权限,这显然是不可接受的. 所以打算使用Gitolite这个组件来做权限控制,搜索了下,找到的文章貌似都是老版本的,所以有了写

[ArgumentException: 可能证书“CN=JRNet01-PC”没有能够进行密钥交换的私钥,或者进程可能没有访问私钥的权限。有关详细信息,请参见内部异常。]

堆栈跟踪: [CryptographicException: 密钥集不存在. ] System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +450 System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parame

Windows Service 访问远程共享权限设置

最近为实现共享目录之间的文件同步,开发了一个Windows Service. 考虑到在拷贝过程中,如果网络忽然抽风访问不了,导致文件拷贝不完整的情况,果断抛弃.Net 自带的 COPY 方法,而使用DOS命令下的XCOPY命令. 嗯.....说干就干... XCOPY方案验证.开发.调试(在自个电脑上建了两个共享目录)....半天时间,全部搞定.貌似事情进展的太顺利了..... 既然本地调试没问题,那就部署到测试环境上吧.好吧...问题来了. 同步两个共享目录,居然失败!查看日志,XCOPY的退

使用Gitolite来对Git的repository实现权限控制

我们项目组打算从svn向git迁移,前几天我搭建了git环境,把代码从svn转移过来,然后所有成员都通过server上的git账号来做pull和push,一切都安置妥当,没有问题.但是后来其它项目组也打算使用这个git server,那么问题来了,之前那种授权的方式肯定是不够的,因为只要能连上server,那么他对这个server上所有的repository都有完全的读写权限,这显然是不可接受的. 所以打算使用Gitolite这个组件来做权限控制,搜索了下,找到的文章貌似都是老版本的,所以有了写

git忽略掉文件权限检查

有时 git diff 执行显示文件内容没变化,但是有 old mode xxx new mode,原因是文件的权限,被chmod变化了,这种变化也被 diff 识别出来了,让git忽略掉文件权限检查可以使用一下命令: git config core.fileMode false 原文地址:https://www.cnblogs.com/senlinyang/p/8435928.html

TFS--解决新创建的windows用户无法访问TFS的问题

今天入职新同事,帮忙配置TFS的账号碰到一个问题,TFS账号是映射取administrators组得 所以新建用户之后,无法马上引入TFS.查询原因是 Builtin组中没有该账号,以前也总是碰到新加一个人,总是无法马上连接上TFS. 度娘,csdn一圈.给出得答案: 的确是IIS中得HTTP来访问TFS.但是我重启了啊,服务器都重启了还是没看见账号. 最后再次重启TFS后台服务!!! 出大招了 居然也就搞定了~ 特发文章今年. 今天重新开始记录博客园内容.忘各位码友莫要抛弃我~ 原文地址:ht