git 如何在 Sourcetree 中注销/切换帐户

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38402998/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:22:29  来源:igfitidea点击:

How to logout / switch accounts in Sourcetree

gitversion-controlatlassian-sourcetreesourcetree

提问by Nate

After installing Sourcetree, you are prompted to log into your Atlassian account. However, once you are logged in, there is no logout option to log out or switch accounts. How do I do this?

安装 Sourcetree 后,系统会提示您登录 Atlassian 帐户。但是,一旦您登录,就没有用于注销或切换帐户的注销选项。我该怎么做呢?

回答by Nate

After installing Sourcetree, you are prompted to log into your Atlassian account. However, once you are logged in, there is no logout option to log out or switch accounts.

安装 Sourcetree 后,系统会提示您登录 Atlassian 帐户。但是,一旦您登录,就没有用于注销或切换帐户的注销选项。

To do this,

去做这个,

  1. Close Sourcetree
  2. Navigate to <username>\AppData\Local\Atlassian\SourceTree\
  3. Delete accounts.jsonafter making a backup.
  4. Restart Sourcetree.
  1. 关闭源树
  2. 导航 <username>\AppData\Local\Atlassian\SourceTree\
  3. accounts.json备份后删除。
  4. 重新启动源树。

You should see the following dialog and then be prompted to login to your Atlassian account.

您应该会看到以下对话框,然后系统会提示您登录您的 Atlassian 帐户。

enter image description here

在此处输入图片说明

Note: I'm using Windows 10, but I assume it is the same for other systems.

注意:我使用的是 Windows 10,但我认为其他系统也是如此。

回答by Sandeep Kumar Mehta

You can flow flowing steps :

你可以流动流动的步骤:

Step 1. Tools -> Options Options

步骤 1. 工具 -> 选项 选项

Step 2. Authentication

步骤 2. 身份验证

Step 3. Edit Credentials

步骤 3. 编辑凭据

回答by Hammad Khan

Not an answer but related.

不是答案而是相关的。

You can work with two or more accounts in SourceTree, without switching which is kind of nice. You can check out from two different bitbucket accounts for example without having to logout etc. Note that certain GUI commands for example pushing may not work in that case, you have to use command line for that, but it will work.

您可以在 SourceTree 中使用两个或多个帐户,而无需切换,这很好。例如,您可以从两个不同的 bitbucket 帐户中签出,而无需注销等。请注意,某些 GUI 命令(例如推送)在这种情况下可能不起作用,您必须为此使用命令行,但它会起作用。

There is another caveat when committing change in multiple account scenario, while source allows you to add multiple account, you can't just swatch them. You have to manually change your name/email when committing (if it is not correct), as shown in the image below (click on image icon to bring up that dialog). But you can work with multiple accounts under the same login which is kind of nice

在多帐户场景中提交更改时还有一个警告,虽然 source 允许您添加多个帐户,但您不能只是对它们进行采样。您必须在提交时手动更改您的姓名/电子邮件(如果不正确),如下图所示(单击图像图标以显示该对话框)。但是您可以在同一登录名下使用多个帐户,这很好

enter image description here.

在此处输入图片说明.

回答by Anuj Panwar

If you are using SourceTree on Mac then go to SourceTree -> Preference -> Network

如果您在 Mac 上使用 SourceTree,请转到 SourceTree -> Preference -> Network

You will get the list of username for URLS. You can update username there and next push/pull event that username will start getting reflect.

您将获得 URLS 的用户名列表。您可以在那里更新用户名,然后用户名将开始反映下一个推/拉事件。

回答by Rohit Mandiwal

Below Steps worked for me

以下步骤对我有用

Sourcetree(Top bar) > Preference> Accounts(2nd Tab) > Select your account & click Remove

Sourcetree(顶栏)> Preference> Accounts(第二个选项卡)> 选择您的帐户并单击Remove

回答by Akhilesh_IN

goto

C:\Users\(User)\AppData\Local\Atlassian\SourceTree

C:\Users\(User)\AppData\Local\Atlassian\SourceTree

and

delete passwdfile.

删除passwd文件。

(optional can edituserhostsfile for editing username)

(可选的可以edituserhosts文件进行编辑username