2014-01-09 25 views
4

我們有一個本地Artifactory Pro服務器,它提供nuget包並使用LDAP來驗證所有用戶。使用cmdline中的Artifactory-NuGet可以完美地工作,但是當嘗試從Visual Studio使用包管理器時,身份驗證失敗。從Visual Studio內向Artifactory上的NuGet進行身份驗證

我注意到,Visual Studio在第一次失敗的身份驗證嘗試後嘗試添加域前綴:嘗試以「用戶」身份登錄失敗,然後登錄身份驗證窗口包含'DOMAIN \ user'作爲用戶名。

我不確定問題的根源是在Visual Studio中還是在Artifactory中。我注意到,對Artifactory的Web訪問不接受「DOMAIN \ user」形式的用戶名,儘管我覺得它應該。

所以我的問題是:如何從Visual Studio中驗證由LDAP支持的Artifactory提供的身份驗證的NuGet服務器?

+0

您是否確實需要每個用戶進行身份驗證?如果回購是內部的,你可以只允許開放的讀取權限,也許只有一個賬戶? –

+0

不幸的是,這是不可能的,因爲我們的開發人員位於多個地點,我們不能只複製所有服務器,並且不能在沒有身份驗證的情況下下載。 – Wilbert

+0

我建議你跟JFrog的人說話 - 他們真的很有幫助和熱心。 –

回答

2

確保你輸入你的用戶名(LDAP用戶名)和您的加密的密碼,一個你可以通過artifactory webapp

+0

一直在努力,並且加密的密碼是需要的。 – FriendlyGuy

1

我有同樣的問題搞定了,不過我能夠通過一個瀏覽器來下載中心NuGet命令行。

我用fiddler看了看不同的流量,看起來VS在認證後沒有添加安全令牌。當我使用瀏覽器下載時,流量會在身份驗證後顯示一個附加的Cookie,但不會出現在VS請求中。

Browser 
Request = https://server/repo/artifact.pkg 
Responce = 401 not authrised 
{user prompted for username and password} 
Request = http TUNNEL encryped basic login 
Responce = 200 encrypted security token 
Request = https://server/repo/artifact.pkg + security token 
Responce = 200 the pkg file 


Visual studio 
Request = https://server/repo/$metadata 
Responce = 401 not authrised 
{user prompted for username and password} 
Request = http TUNNEL encryped basic login 
Responce = 200 encrypted security token 
Request = https://server/repo/$metadata + security token 
Responce = 200 <edmx> list of artifacts 
Request = https://server/repo/artifact.pkg 
Responce = 401 not authrised 
{user prompted for username and password} 
Request = http TUNNEL encryped basic login 
Responce = 200 encrypted security token 
Request = https://server/repo/artifact.pkg 
Responce = 301 its moved to "https://server/repo/artifact.pkg" 

貌似VS已損壞,並且Cookie未在後續請求中存儲和發送。它在Windows窗體中使用非常恐怖的Browser組件,並且不會在請求之間保留cookie容器。可能想要向MS報告。

相關問題