Comments (11)
Thanks Jörg, I'll look into this.
from gitflow.vs.
Unfortunately, the credentials workaround doesn't seem to work if Visual Studio Online is used, perhaps because of the way VSO implements authentication :-(
from gitflow.vs.
@pcolmer by default VSO uses (afaik) an OAuth based authentication approach, you can however create and use plain username/password combination, too see e.g. http://www.visualstudio.com/en-us/integrate/get-started/auth/overview how to set them up.
from gitflow.vs.
@jbattermann Thanks for the tip - that fixed it. I've configured git to use the Windows Credentials store, and Windows appears to have remembered my username and password for the VSO URL but it is still prompting me. Not sure why but if I stick to finishing features at the command line, I guess it isn't too big a deal for now.
from gitflow.vs.
I'll see if I can add code to the extension that checks if you are being prompted for credentials, to avoid the blocking issues. But I won't be able to authenticate of course
from gitflow.vs.
@jakobehn Looking at (or perhaps even reading for the first time!) https://msdn.microsoft.com/en-us/library/dd286572.aspx#setup, their recommendation, like @jbattermann, is to use http://gitcredentialstore.codeplex.com/. Although the documentation at https://help.github.com/articles/caching-your-github-password-in-git/ says that msysgit can be configured to store credentials by using "git config --global credential.helper wincred", I couldn't stop it prompting for credentials. gitcredentialstore, on the other hand, not only prompts with a GUI interface (which may solve the blocking problem) but also properly caches the credentials and re-uses them in the future.
It may, therefore, be sufficient to add some more documentation to guide the user through some additional setup steps.
from gitflow.vs.
I just published a new version (0.9.22) that added works around this problem by using a timeout when running git flow. If the timeout hits, a notification message is shown to the user with a suggestion what might be the problem. Unfortunately since git.exe does not output the credentials prompt to stdout, it is quite hard to capture this output properly. If anyone has some info on how to capture the screen buffer please contact me
from gitflow.vs.
Does this code give you any clues? Although I notice it's currently using StandardOutput, maybe you could modify the code in some way to achieve what you need to do?
On the other hand, it might be exactly what you've already tried, but I thought I'd put it out there, just in case it helped.
protected static string GetProcessOutput(string name, string args)
{
try
{
//var path = Environment.GetFolderPath(Environment.SpecialFolder.System);
var p = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput = true,
FileName = name,
Arguments=args,
WindowStyle = ProcessWindowStyle.Hidden
}
};
p.Start();
// NB: make sure to read to the end of the redirected stream before waiting
var output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
return output;
}
catch (Exception ex)
{
Console.WriteLine(ex);
return "";
}
}
from gitflow.vs.
Thanks Yann, the problem is that when Git prompts for credentials it does not stream it to StdOut, but instead writes directly to the console screen buffer (https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx).
Reading from this is quite complicated, the API is pretty low level, so unfortunately I haven't been able to fix this yet.
from gitflow.vs.
Jim Mischel wrote an MIT licensed library / sample code to access to screen buffers .. which includes a console buffer reading sample, too. Not sure if you want to pull in external code here, but maybe it's worth a look.
While the article(s) he mentions are no longer available, the sample code still is.
from gitflow.vs.
Thank Jörg, I'll take a look at it! I actually think I found that broken link last time I checked around for implementing screen buffer support, but I didn't find the link to the sample :-)
from gitflow.vs.
Related Issues (20)
- The future of GitFlow is unsure HOT 13
- GitFlow for VS2022 HOT 5
- Issue running install in Visual Studio 2019 HOT 10
- Visual Studio 2022 Support HOT 1
- Timeout and Reload message in VS2019
- How to change the remote name 'origin' to a different one?
- Multiple repo
- VS 2017 An exception was thrown while initializing part "GitFlowVS.Extension.GitFlowActionSection" HOT 3
- support vs 2019 HOT 5
- GitFlow not preserved as a tab HOT 1
- No error notification if there's a failure when creating a release HOT 3
- Tests do not work anymore after finishing a feature.
- Support for Visual Studio 2019 HOT 2
- Upgrade GitFlow scripts from AVH repo HOT 2
- Consider implementing GVFS Protocol so extension will be compatible with VFS for Git HOT 1
- GitFlow button not appearing HOT 4
- Problem create new feature with subfolder HOT 5
- Visual Studio 16.8 has a new Git tool windows. GitFlow should be moved out of Team Explorer window. HOT 1
- Plugin not installed or initialize does nothing
- Giflow button click throws an error. Could not load an assembly. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitflow.vs.