在VScode上更改git帐户

在VScode上更改git帐户

本文介绍了在VScode上更改git帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是尝试将存储库推送到github,但是得到了这个对话框

I just try to push a repo to github , but I get this dialog

PS:4495b是旧帐户我找不到改变它的方法.

PS : 4495b is the old accountI can't find a way to change it.

我尝试了

git config --global --unset credential.helper

  • 重新安装git并重新配置
  • 重新安装VScode
  • 有什么想法如何刷新给定的帐户吗?

    Any ideas how to refresh the given account?

    推荐答案

    如果确认未设置 git config credential.helper ,请首先使用

    If you confirm that git config credential.helper is not set, check first the remote URL with

    cd /path/to/repo
    git remote -v
    

    如果它是SSH URL,请确保其关联的〜/.ssh/id_rsa ( .pub )不是您旧帐户的私钥/公钥.
    〜/.ssh/config 不引用您旧帐户的SSH私钥.

    If it is an SSH URL, make sure its associated ~/.ssh/id_rsa(.pub) are not the private/public key of your old account.
    Or that ~/.ssh/config does not reference the SSH private key of your old account.

    这篇关于在VScode上更改git帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 09:20