It's what Visual Studio Team Services now seems to recommend over the Alternate authentication credentials. Just install that utility, and then the next time you git pull from Git Bash, it will prompt you for your Visual Studio Team Services access credentials. With the imminent arrival of Visual Studio Online Package Manager, which lets us host NuGet (and other) packages on our Visual Studio Online account, it is almost certain that you are going to lose the plot when managing NuGet packages in Visual Studio and keep getting prompted for your account details (especially as the “Remember Credentials” tick box is just there to upset you).
Git is a distributed version control system that allows teams to work on the same documents simultaneously. This means there is a single server that contains all the files, but whenever a repository is checked out from this central source, the entire repository is cloned locally to your machine.
There are many remote hosts that allow you to work with Git for version control, however the most common host is GitHub. The following example uses a GitHub host, but you can use any Git host for version control in Visual Studio for Mac.
If you wish to use GitHub, make sure that you have an account created and configured before following the steps in this article.
Creating a remote repo on GitHub
The following example uses a GitHub host, but you can use any Git host for version control in Visual Studio for Mac.
To set up a Git repository, execute the following steps:
Publishing an existing project
If you have an existing project that is not already in version control, use the following steps to set it up in Git:
Note
If your account has two-factor authentication (2FA) enabled, you will need to create an Access Token, which is used in place of a password. If you have not created an access token, follow the steps in the Git Access Token documentation.
Publishing a new project
The new project dialog can be used to create a new project with a local git repository. To enable it, select the Use git for version control checkbox, as illustrated in the following screenshot. This will initialize your repo and add an optional .gitignore file:
Follow the steps below to push your new local repository to a new GitHub repository:
Note
Canon’s Print Studio Pro plug-in provides the perfect workflow link between your image and the finished printed product. This unique software is designed specifically for Canon professional printers and lets you achieve expert quality photo prints with ease. Canon photo studio for mac. PhotoStudio 6 for Mac is a powerful and easy-to-use photo editor for Mac OS X, gives you everything to enhance and print your digital photos which help bring. Popular RAW file formats by Canon.
If you have not already created a GitHub repository, refer to the Creating a remote repo on GitHub section.
Note
If your account has two-factor authentication (2FA) enabled, you will need to create an Access Token, which is used in place of a password. If you have not created an access token, follow the steps in the Git Access Token documentation.
Visual Studio for Mac will now push the changes to your remote GitHub repository:
Check out an existing repository
It's likely that you'll have to work with a GitHub repo that exists only on the remote, not on your local machine. Visual Studio for Mac allows you to check this repo out quickly. Follow the steps below to clone it to your machine:
Note
You may experience issues if the repo is over 4 GB in size.
Troubleshooting
If you have issues with initializing your project with an empty remote repository, you can try the following steps:
See also
Active1 month ago
I started using Visual Studio Code, and I was trying to save my test project into GitHub, but Visual Studio Code is always asking for my GitHub credentials.
I have installed in my PC GitHub Desktop and also Git, I already ran:
but still Visual Studio Code is asking for the credentials.
Any help?
here is my .gitconfig file located in the user profile folfer:
Here is the popup windows asking for the credentials:
I enter my GitHub credentials in the popup, but still getting this error in the Git output window in Visual Studio Code:
ddieppa
ddieppaddieppa
1,61155 gold badges2323 silver badges3232 bronze badges
15 AnswersLast updated answer @ 05 March, 19
After 98 upvotes, I think I need to give a true answer with the explaining.
Why does VS code ask password? Because VSCode runs auto-fetch feature while git server doesn't have any information to authorize your identity. It happens when:
The updated part at the end of this answer doesn't help you at all. Except it makes you being stagnant in the workflow. It only stops thing happening in VSCode and let this thing happens in the terminal.
Sorry if this bad answer had affected you for a long long time.
--
the original answer (bad)
I found the solution on VSCode document:
Tip: You should set up a credential helper to avoid getting asked for credentials every time VS Code talks to your Git remotes. If you don't do this, you may want to consider Disabling Autofetch in the .. menu to reduce the number of prompts you get.
So, turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.
In Terminal, enter the following:
To change the default password cache timeout, enter the following:
UPDATE
I installed VS Code and config same above, but as @ddieppa said, It didn't work for me too. So I tried to find an option in User Setting, and I saw 'git.autofetch' = true, now set it's false! VS Code is no longer required to enter password repeatedly again!
In menu, click File / Preferences / User SettingAnd type these:
Place your settings in this file to overwrite the default settings
DavuzDavuz
2,8101111 gold badges3333 silver badges5454 bronze badges
You should be able to set your credentials like this:
git remote set-url origin https://<USERNAME>:<PASSWORD>@bitbucket.org/path/to/repo.git
You can get the remote url like this:
git config --get remote.origin.url
yohosuffyohosuff
This has been working for me:
1. Set credential hepler to store $ git config --global credential.helper store 2. then verify if you want: $ git config --global credential.helperstore
Simple example when using git bash quoted from Here (works for current repo only, use
--global for all repos)
$ git config credential.helper store $ git push http://example.com/repo.git Username: < type your username > Password: < type your password >
[several days later]
$ git push http://example.com/repo.git [your credentials are used automatically]
Will work for VS Code too.
More detailed example and advanced usage here.
Note: Username & Passwords are not encrypted and stored in plain text format so use it on your personal computer only.
Vaibhav VishalVaibhav Vishal
2,29555 gold badges1616 silver badges2828 bronze badges
Try installing 'Git Credential Manager For Windows' (and following instructions for setting up the credential manager).
When required within an app using Git (e.g. VS Code) it will 'magically' open the required dialog for Visual Studio Team Services credential input.
ReddogReddog
12.7k33 gold badges4343 silver badges5858 bronze badges
All I had to do was to run this command:
git config --global credential.helper wincred
Then I was prompted for password twice.
Next time it worked without prompting me for password.
GoToGoTo
Use ssh instead of http/https.
You will need to set ssh keys on your local machine, upload them to your git server and replace the url form
http:// to git:// and you will not need to use passwords anymore.
If you cant use ssh add this to your config:
documents are here.
Using ssh key in github
Simply follow those steps and you will set up your ssh key in no time:
How to add sh key to github account?
And you all set to go :-)
CodeWizardCodeWizard
62.2k1212 gold badges8181 silver badges104104 bronze badges
The following steps walk you through how to:
**Generating SSH keys without a passphrase is unwise if your work is particularly sensitive.
OS - Fedora 28 | Editor - VS Code v1.23.0 | Repository - Git
Generate SSH keys:
After completing the above steps, the location of your public key is shown in the terminal window. If the currently logged in user is 'bob' the location of your public key would be /home/bob/.ssh/id_rsa.pub
Copy and import public key to GitHub:
Confirm the above steps:
First commit / push without having to enter a username / password: -
touch test.txt
The only hiccup you may encounter is when you attempt to SSH to GitHub. This link will provide some assistance -
Happy hunting!
FnaticalFnatical
Use an SSH key without a passphrase.
Maybe this is obvious to some (wasn't to me). It also doesn't solve the issue if you absolutely require a passphrase, but this was a decent compromise in my situation on Mac.
adampfosteradampfoster
After fighting with something like this for a little while, I think I came up with a good solution, especially when having multiple accounts across both GitHub and BitBucket. However for VSCode, it ultimately ended up as start it from a Git Bash terminal so that it inherited the environment variables from the bash session and it knew which ssh-agent to look at.
I realise this is an old post but I still really struggled to find one place to get the info I needed. Plus since 2017, ssh-agent got the ability to prompt you for a passphrase only when you try to access a repo.
I put my findings down here if anyone is interested:
ScubaManDanScubaManDan
Visual studio code for mac download. Following that article:
You may just set GIT_SSH env. var. to the Putty's plink.exe program.(Then use the pageant.exe as a auth. agent)
myf
3,78411 gold badge2222 silver badges2929 bronze badges
Visual Studio For Mac Always Asking For Git Credentials Store
Paul PakuPaul Paku
Solve the issue by following steps.
Uninstalled softwares Vscode and git and reinstalled the same. Changed the git repository clone url from ssh to https.
SundarSundar
31711 gold badge33 silver badges1212 bronze badges
For windows 10 : go to control panel/Credential manager/ Windows Credential--> click on the git link, --> edit--> update to new password. That should work
MeeraMeera
For me I had setup my remote repo with an SSH key but git could not find them because the HOMEDRIVE environment variable was automatically getting set to a network share due to my company's domain policy. Changing that environment variable in my shell prior to launching
code . caused VSCode to inherit the correct environment variable and viola no more connection errors in the git output window.
Now I just have to figure out how to override the domain policy so HOMEDRIVE is always pointing to my local
c:usersmarvhen directory which is the default location for the .ssh directory.
marvhenmarvhen
I managed to stop this by carrying out the following steps.
Visual Studio For Mac Always Asking For Git Credentials Cache
NOTE: I was using a Personal Access Token as my password.
MickMick
I solved a similar problem in a simple way:
That's all. I Solved the problem
AvinashAvinash
Visual Studio For Mac Always Asking For Git Credentials FileNot the answer you're looking for? Browse other questions tagged gitvisual-studiogithubvisual-studio-code or ask your own question.Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |