使用Git Gui Windows - 如何保存用户凭据 - 用户名和密码 [英] Using Git Gui Windows - How do you save user credentials - Username and Password

查看:731
本文介绍了使用Git Gui Windows - 如何保存用户凭据 - 用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题之前已经问过,我一直在看这个链接:

https://www.kernel.org/pub/software/scm/git/ docs / git-credential-store.html



对于一般使用Windows和Git Hub的Git Gui应用程序,我真的很陌生。



我通过以 https://github.com/projectname.git



为了达到目的,我将粘贴文件复制到我的本地git目录,然后在Git Gui中点击f5并提交/推送到原点。



然而,每当我想要推送某些内容时,它都会询问我的用户名和密码。
指南说,用给定格式的用户名和密码创建一个名为.git-credentials的文本文件:

https:// user:pass@example.com



问题:



如何将.git-credentials文件的用法与我的Git Gui应用程序相链接?我是否使用DOS?或者某个地方的Git Shell?...



任何帮助将不胜感激...

解决方案

一个解决方案是使用 GitHub for Windows 应用程序:它将为您存储您的凭据,如在此 GitHub帮助页面中提到。



但它也增加了:b
$ b


如果你不想使用GitHub for Windows,你可以在这里下载适用于你的操作系统的助手: / p>

Windows Vista,7,& 8 (需要.NET 4.0)



解压缩文件并运行 git-credential-winstore.exe

提示:凭证助手仅在克隆HTTPS存储库URL时起作用。如果您使用SSH存储库URL,则使用SSH密钥进行身份验证。


所以你不需要创建一个 .git-credentials 文件: git-credential-winstore.exe 程序将指导您完成它。


I know this question has been asked before and I've been looking at this link :

https://www.kernel.org/pub/software/scm/git/docs/git-credential-store.html

I'm really really new to using Git Gui Application for Windows and Git Hub in general.

I've "fetched" an existing repository by typing in the URL for the repository from the Git Hub website in the format https://github.com/projectname.git

To push to it, I copy paste files into my local git directory and then hit f5 in Git Gui and commit/push to the origin.

However each time I want to push something - it asks me for my username and password. The guide says to create a text file named .git-credentials with your username and password in the given format:

https://user:pass@example.com

Question:

How do I link the usage of the .git-credentials file with my Git Gui Application?...Am I using DOS? Or some Git Shell from somewhere?...

Any help would be greatly appreciated...

解决方案

One solution is to use the GitHub for Windows application: it will store your credentials for you, as mentioned in this GitHub help page.

But it also adds:

If you don't want to use GitHub for Windows, you can download the helper for your OS here:

Windows Vista, 7, & 8 (.NET 4.0 required)

Unzip the file and run the git-credential-winstore.exe program inside. This will start up the helper and update your git config to use it.

Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication.

So you don't need to create yourself a .git-credentials file: the git-credential-winstore.exe program will guide you through it.

这篇关于使用Git Gui Windows - 如何保存用户凭据 - 用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆