如何强制混帐为提示输入凭据? [英] How do I force git to prompt for credentials?

查看:123
本文介绍了如何强制混帐为提示输入凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

星期以前(在雾),我需要做出一些改变在GitHub上托管的东西。我被一个人 - 谁也不知道,更比我通过电话,以便配置什么类型(小SWKMTM),拉下,修改后推,然后激活东西执导。到混帐这涉及发出指令一部分说我是SWKMTM。

Weeks ago (and in a fog), I needed to make some changes to something hosted at github. I was directed by someone-who-knows-more-than-me (SWKMTM) via phone on exactly what to type in order to configure, pull down, modify, push back and then activate things. Part of this involved issuing instructions to git that said I as SWKMTM.

现在,我已经有时间来学习一些关于混帐/ github上(以及回忆我的github的登录信息),我已经走了回来,并试图取代我的身份为我的客户机上SWKMTM(一拉混帐配置--global user.name 混帐配置--global user.email )。这样做后,我可以像以前一样执行相同的更新活动。不过,我还没有被提示输入我的密码GitHub的(即没有进入我的github密码无请求)。我假设的东西已被缓存确定我为SWKMTM(这一定是我做的,涉及进入SWKMTM的GitHub的密码较早雾的东西) - 在本地或通过隐含送​​我的SSH公钥

Now that I've had time to learn a bit about git/github (as well as to recall my github login information), I've gone back and tried to substitute my identity for SWKMTM on my client machine (a la git config --global user.name and git config --global user.email). After doing this, I can perform the same update activities as before. However, I have yet to be prompted to enter my github password (i.e., there is NO request to enter my github password). I'm assuming that something has been cached identifying me as SWKMTM (and that I must've done something in the earlier fog that involved entering SWKMTM's github password) -- either locally or by implicitly sending my SSH public key.

我已经搜查各地白费。* RC文件和配置目录中的任何类似可能与SWKMTM相关联(在调度所述凭据,并迫使git的提示输入新的希望)凭证。我同样没能找到在github上什么,如果有某种混叠公共密钥(以及它如何被清除),那可能会告诉。

I've searched around in vain for .*rc files and configuration directories for anything that resembles credentials that might be associated with SWKMTM (in hopes of dispatching said credentials and forcing git to prompt for new ones). I've similarly failed to find anything at github that might tell if there is some sort of aliasing for public keys (and how it might be purged).

我也试过任何凭据的建议混帐配置-l助手并没有发现。

I've also tried the advised "git config -l" for any credential helper and have found none.

我怎么能强迫的github忘记,我一直在伪装成SWKMTM?

How can I force github to forget that I've been masquerading as SWKMTM?

[旁注:这是在Mac OS与配置没有迹象文件凭据osxkeychain使用。只有使用后 GIT_TRACE = 1 上推是很明显被存储在哪里资格审查。]

[sidenote: this is on MacOS with no indication in config files that credential-osxkeychain is used. Only after using GIT_TRACE=1 on a push was it obvious where the credentialing was stored.]

推荐答案

user.name user.email 有无关的凭据,他们只是被放入每次提交您对存储您的作者信息字符串。

user.name and user.email have nothing to do with credentials, they are just strings that are put into each commit you make to store your authorship information.

通常Git通过SSH进行身份验证你,所以你必须无论是从别的机器的SSH私钥复制到新的客户端,或创建一个新的密钥对和公共部分添加到您的GitHub的个人资料。

Git normally authenticates you via SSH, so you have to either copy your SSH private key from the other machine to your new client, or create a new key pair and add the public part to your github profile.

OK,之后在聊天广泛讨论事实证明,Git的使用其中规定previously存储凭据osxkeychain凭证帮手。

OK, after extensive discussion in the chat it turns out that Git was using the osxkeychain credential helper which provided previously stored credentials.

从你的OSX的钥匙串删除您存储的凭据或禁用的Git的crend​​ential助手( credential.helper 配置选项)再次被提示进行身份验证。

Remove your stored credentials from your OSX keychain or disable the crendential helper (credential.helper config option) in Git to be prompted for authentication again.

这篇关于如何强制混帐为提示输入凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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