You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request cannot be constructed from a URL that includes credentials #678
I'm using isomorphic-git in the browser and the upgrade from 0.43.1 to 0.51.0 broke our connexion to azure devops git with the following error :
TypeError: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials
The url is formatted like this : https://#User#@dev.azure.com/#Organization#/#Project#/_git/#Repository#
(I can't give the exact url for privacy)
Oh haha, merging the PR closes the issue. Well if after you test it, it doesn't work, it's easy to reopen this issue! 😄 The bot will leave a comment here in a bit once it's published.
And that is SUPER AWESOME that Azure DevOps supports CORS headers! I will have to test that out myself; that is news to me! I'll want to add that to the README! 🎉
@roddone It looks like isomorphic-git needs the noGitSuffix: true param in order to clone from Azure. (Are you using that out of curiosity? I really want to fix that behavior for the 1.0 release.)
Also, (I just thought of this) the code can't handle "mixing" specifying the username via the URL and the password via a parameter. E.g.
throws an error saying the username is missing. I don't think that worked in 0.43.1, let me know if we need to cover that case. We probably don't... it works if you add a username param. The main thing is it no longer throws an error, since we strip out username:password from URLs now before handing them to window.fetch.
@wmhilton yes we use the noGitSuffix: true and we specify both 'password' and 'username' parameters.
I don't think there is another way to do make it work with azure devops but if you find one, please share the tip !
I'm away from office until tomorrow, so I will probably be able to test your fix tomorrow ;)
Just as a headsup @roddone , you can authenticate to Azure DevOps using PATs as well if you use the username and token params. The username param just has to be set to the organization name. Still need the noGitSuffix: true as well.
Activity
billiegoose commentedon Jan 8, 2019
Wait a minute... can Azure DevOps git can be fetched in the browser without using a CORS proxy?
roddone commentedon Jan 8, 2019
Yes, it seems to be able to fetch without cors proxy 😉.
Thanks for the quick fix, I will test it asap and close this if it corrects the issue.
billiegoose commentedon Jan 8, 2019
I'll go ahead and merge the fix I guess!
billiegoose commentedon Jan 8, 2019
Oh haha, merging the PR closes the issue. Well if after you test it, it doesn't work, it's easy to reopen this issue! 😄 The bot will leave a comment here in a bit once it's published.
And that is SUPER AWESOME that Azure DevOps supports CORS headers! I will have to test that out myself; that is news to me! I'll want to add that to the README! 🎉
isomorphic-git-bot commentedon Jan 8, 2019
🎉 This issue has been resolved in version 0.51.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
billiegoose commentedon Jan 8, 2019
@roddone It looks like isomorphic-git needs the
noGitSuffix: trueparam in order to clone from Azure. (Are you using that out of curiosity? I really want to fix that behavior for the1.0release.)Also, (I just thought of this) the code can't handle "mixing" specifying the username via the URL and the password via a parameter. E.g.
throws an error saying the username is missing. I don't think that worked in 0.43.1, let me know if we need to cover that case. We probably don't... it works if you add a
usernameparam. The main thing is it no longer throws an error, since we strip out username:password from URLs now before handing them to window.fetch.roddone commentedon Jan 8, 2019
@wmhilton yes we use the
noGitSuffix: trueand we specify both 'password' and 'username' parameters.I don't think there is another way to do make it work with azure devops but if you find one, please share the tip !
I'm away from office until tomorrow, so I will probably be able to test your fix tomorrow ;)
roddone commentedon Jan 9, 2019
I confirm your fix did the job, thanks !
pdittaro commentedon Mar 6, 2019
Just as a headsup @roddone , you can authenticate to Azure DevOps using PATs as well if you use the
usernameandtokenparams. Theusernameparam just has to be set to the organization name. Still need thenoGitSuffix: trueas well.