git克隆从Linux到TFS git回购 [英] git clone from Linux to TFS git repo

查看:219
本文介绍了git克隆从Linux到TFS git回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图解决一个Git repo的问题,这个问题在一个本地TFS2017上托管,不能在不在域中的linux机器上执行git clone命令,继续获得
身份验证失败。



我使用的用户是Linux计算机上的本地用户(与域用户同名,相同的密码)
用户被授予Git仓库中的用户
在加入Windows机器的域中使用相同的钻取时,一切正常(我使用Git Bash)。

我在Linux上创建了ssh密钥,并在TFS用户配置文件中将它更新为公共密码,并没有帮助。



这里是一个TFS活动日志:
指导ContOS >> AD身份验证,然后我继续步骤4. 2 。在Linux机器上使用ssh-keygen生成公用密钥,并将该密钥用作 3 。在TFS网页的用户图标上,我们有安全选项卡,进入 SSH公共密钥,并从Linux添加生成的密钥(必须来自公钥,而不是专用密钥)。

4 即可。最后从Linux中输入完整的回购地址,例如 git clone ssh://tfs.domain.com:22 / Defaultcollection / _projectname / git
它会提示你授权RSA连接,就是这样。

希望有帮助。


I've been trying to solve an issue with Git repo that is hosted on an on-prem TFS2017, cannot do a "git clone" command from a linux machine which is not in the domain, keep getting "fatal: Authentication failed for".

The user i am using is a local user on the Linux machine (same name as domain user, same password) the user is granted user in the Git repo While working same drill from a domain joined Windows machine, everything works fine (i use Git Bash).

Ive created ssh key on the Linux and updated it in the TFS user profile as public, didnt help.

Here is a TFS activity log:

In the picture we can see the TOP request has no Authentication, no identity and Application (when trying to access from Linux), yet on the bottom, same access from Git Bash (Win machine), Authentication type is "Negotiate", there is Identity name and the Application.

TY guys.

解决方案

Ive managed to overcome the issue, one of the steps was to configure the SSH authentication..
1. On the Linux Machine, ive added the TFS server to HOSTS file and installed Git client.
Then ive followed this guide guide for ContOS >> AD authentication, i followed up to step 4.
2. On the Linux machine generate Public Key using "ssh-keygen", and use this key as
3. On the TFS web page, at the user icon, we have security tab, went to SSH public keys and added the generated key from Linux (must be from public key, not private).
4. Eventually from the Linux i type in the full repo address, for example git clone ssh://tfs.domain.com:22/Defaultcollection/_projectname/git

It will prompt you to authorize the RSA connection, and that's it.
Hope that helps.

这篇关于git克隆从Linux到TFS git回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆