简体   繁体   中英

How to do git push in Visual Studio Code?

There is a "Push" menu item, but when I click on it, nothing happens except for a subtle progressing bar showing up and never finished. From Visual Studio Code's Docs page, I found this line: "Credential management is not handled by VSCode for now," and that page links to a GitHub page on credential helper, which is too specific for other remote server (in my case, bitbucket) and not specific enough on how to set up for VS Code.

If you are in windows use this line in your git bash:

git config --global credential.helper wincred

Next time git will remember your password. Thats all, the VSCode will work fine ;)

Bye Bytes !

Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

git config --global user.name "YOUR NAME"

Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one found in your email settings on Github. To keep your email address hidden, see "Keeping your email address private".

git config --global user.email "YOUR EMAIL ADDRESS"

See this : Set Up Git

如果您(或未来的搜索者)正在寻找专门针对bitbucket的指令(尽管更常见的是针对git) 以下是使用凭据缓存进行永久身份验证的Atlassian帮助页面。

Currently, VSCode implements git integration by spawning git . If git push works on your command line without prompting for username / password, it should work from VSCode too.

I don't know if setting up SourceTree to not prompt for a username / password is sufficient to get vanilla command line git not prompt as well.

if you want push to an own server where you need to enter a password because you use ssh authentification you can do it like this:

Start Visual Studio Code from the git commandpromt with the command code

I found this at the end of this page https://code.visualstudio.com/Docs/editor/versioncontrol in the FaQ the Question was "Can I use SSH Git authentication with VS Code?"

now every time you interact with the git server you get prompted for the password

here is a guide how to run a command with git when you open git Windows shortcut to run git bash script

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM