2016-04-29 34 views
5

TFS 2015年更新2帶來的Git LFS支持,但是當我試圖用它與布賴恩·凱勒VS2015ALM虛擬機(升級到更新2),我得到這個異常:使用git LFS與TFS 2015年更新2 OnPremise

git-lfs/1.2.0 (GitHub; windows amd64; go 1.6.1; git 386c5d8) 
git version 2.8.1.windows.1 

$ git-lfs.exe smudge -- Image1.jpg 
Error downloading object: Image1.jpg (968bda1e0a17e295e265311f93bc4e631e171 
d776d51c6d7a43b52185c82631a) 

Your user name must be of the form DOMAIN\user. It is currently brian%!(EXTRA st 
ring=string) 
goroutine 1 [running]: 
github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0) 
     C:/Users/techn/go/src/github.com/github/git-lfs/lfs/errors.go:566 +0x87 
github.com/github/git-lfs/commands.logPanicToWriter(0x1a42c0, 0xc082020020, 0x1b 
54a0, 0xc0823ae1a0) 
     C:/Users/techn/go/src/github.com/github/git-lfs/commands/commands.go:195 
+0xf87 
github.com/github/git-lfs/commands.logPanic(0x1b54a0, 0xc0823ae1a0, 0x0, 0x0) 
     C:/Users/techn/go/src/github.com/github/git-lfs/commands/commands.go:159 
+0x419 
github.com/github/git-lfs/commands.handlePanic(0x1b54a0, 0xc0823ae1a0, 0x0, 0x0) 

     C:/Users/techn/go/src/github.com/github/git-lfs/commands/commands.go:134 
+0x55 
github.com/github/git-lfs/commands.LoggedError(0x1b54a0, 0xc0823ae1a0, 0xa25980, 
0x21, 0xc082029c88, 0x2, 0x2) 
     C:/Users/techn/go/src/github.com/github/git-lfs/commands/commands.go:84 
+0x89 
github.com/github/git-lfs/commands.smudgeCommand(0xc52680, 0xc0820f81e0, 0x1, 0x 
2) 
     C:/Users/techn/go/src/github.com/github/git-lfs/commands/command_smudge. 
go:79 +0xdd2 
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).execute 
(0xc52680, 0xc0820f8040, 0x2, 0x2, 0x0, 0x0) 
     C:/Users/techn/go/src/github.com/github/git-lfs/vendor/_nuts/github.com/ 
spf13/cobra/command.go:477 +0x3fb 
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).Execute 
(0xc536c0, 0x0, 0x0) 
     C:/Users/techn/go/src/github.com/github/git-lfs/vendor/_nuts/github.com/ 
spf13/cobra/command.go:551 +0x593 
github.com/github/git-lfs/commands.Run() 
     C:/Users/techn/go/src/github.com/github/git-lfs/commands/commands.go:99 
+0x2a 
main.main() 
     C:/Users/techn/go/src/github.com/github/git-lfs/git-lfs.go:34 +0x135 

ENV: 
LocalWorkingDir=C:\Users\Brian\Source\Repos\DemoGitLfs 
LocalGitDir=C:\Users\Brian\Source\Repos\DemoGitLfs\.git 
LocalGitStorageDir=C:\Users\Brian\Source\Repos\DemoGitLfs\.git 
LocalMediaDir=C:\Users\Brian\Source\Repos\DemoGitLfs\.git\lfs\objects 
LocalReferenceDir= 
TempDir=C:\Users\Brian\Source\Repos\DemoGitLfs\.git\lfs\tmp 
ConcurrentTransfers=1 
BatchTransfer=true 
GIT_DIR=.git 
GIT_LFS_PATH=C:\Program Files\Git LFS 
GIT_PREFIX= 

當我嘗試使用git.exe推送並在VS2015U2第一次推送後工作時,會附加此消息。但是現在當我嘗試用git.exe或VS2015U2重新克隆我的回購庫(結帳失敗)時,我得到了此錯誤。順便說一句,VS在這種情況下完全崩潰。我嘗試了與VSTS相同的操作,並沒有發生錯誤(使用git.exe,GitExtensions或VS2015U2)。所以這似乎是一個問題,如何提供憑據,但如何解決它?

回購步驟:

  1. 創建於TFS門戶網站回購
  2. 克隆它與VS或Git的
  3. 執行 「混帳LFS安裝」
  4. 執行 「混帳LFS濾波道」 *。 JPG「」
  5. 添加圖片到工作區
  6. 提交
  7. 執行「混帳推原稿在主」 =>失敗,git.exe
  8. 執行‘混帳推起源大師’=>與VS作品
  9. 添加第二個圖像,並承諾
  10. 推現在與git.exe
  11. 刪除本地庫
  12. 克隆回購=>失敗上結帳用git.exe或VS

我「克隆-n」試圖避免即時結帳,然後我執行「的git LFS安裝」和「GIT中結帳主」 ,發生同樣的例外情況: 您的用戶nam e必須是DOMAIN \ user形式。它目前是brian%!(另外st ring =字符串)

+0

可能重複[LFS:GX憑證for..XXXX..not found。您的用戶名必須是DOMAIN \ user形式(https://stackoverflow.com/questions/42986608/lfs-git-credentials-for-xxxx-not-found-your-user-name-must-be-of -the形式-DO) –

回答

3

Git Credential Manager for Windows幫助我得到它的工作。

只需使用GCMW並在第一憑據提示(證書存儲在Windows憑據管理器):

  • 用戶名: 「vsalm \布賴恩」
  • 密碼: 「P2ssw0rd」

它工作。

  • 沒有GCMW,它不起作用。
  • 它的工作原理與通過GIT中2.8安裝,1.2.2和1.3手動安裝提供的GCMW(通過添加在gitconfig「[憑證]助手=經理」)

注:克隆與VS2015U2沒有按沒有工作,修復計劃在U3。更多信息:https://connect.microsoft.com/VisualStudio/feedback/details/2657886/cant-use-git-lfs-with-tfs-2015-update-2-onpremise

0

根據錯誤異常,您的TFS服務器正在使用「NTLM」進行身份驗證。通過此身份驗證,您必須輸入用戶名:{DOMAIN} {user}和密碼:{pass}。因此,請將您的git憑證更新爲此格式,然後重試。查看此鏈接瞭解詳情:NTLM Authentication With Git-Lfs

如果LFS服務器返回。「WWW驗證:NTLM」頭,我們將 一套LFS {}終點。訪問是NTLM和重新提交的HTTP請求。 後續請求將通過ntlm認證流程。

我們將NTLM證書存儲在憑證助手中。當用戶 被提示輸入其憑據,他們必須使用 用戶名:{DOMAIN} {}用戶和密碼:{}傳遞

的NTLM通訊協定將由隱藏 實施InitHandshake的ntlm.go類進行處理,身份驗證和挑戰。這個 允許對現有的client.go類進行模仿改變。