Bitbucket git 凭据(如果与 Google 注册)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35008713/
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
Bitbucket git credentials if signed up with Google
提问by Alex
I have an account on bitbucket.org that I created by signing up with my Google account. Now everytime I log in I just click "Log in with Google" and that's fine.
我在 bitbucket.org 上有一个帐户,是通过我的 Google 帐户注册创建的。现在每次登录时,我只需单击“使用 Google 登录”就可以了。
How can I access my repos from git command line? It requests me username and password. I have a username, but no password. How do I log in then?
如何从 git 命令行访问我的存储库?它要求我的用户名和密码。我有用户名,但没有密码。那我怎么登录呢?
采纳答案by Alex
Solved:
解决了:
- Went on the log-in screen and clicked
forgot my password
. - I entered my Google account email and I received a reset link.
- As you enter there a new password you'll have bitbucket id and password to use.
- 进入登录屏幕并单击
forgot my password
。 - 我输入了我的 Google 帐户电子邮件,并收到了一个重置链接。
- 当您在那里输入新密码时,您将拥有可以使用的 bitbucket id 和密码。
Sample:
样本:
git clone https://<bitbucket_id>@bitbucket.org/<repo>
回答by ctrl-z
You should do a one-time setup of creating an "App password" in Bitbucket web UI with permissions to at least read your repositories and then use it in the command line.
您应该一次性设置在 Bitbucket Web UI中创建“应用程序密码”,并具有至少读取您的存储库的权限,然后在命令行中使用它。
How-to:
如何:
- Login to Bitbucket
- Click on your profile image
on the right(now on the bottom left) - Choose Bitbucket settings
- Under Access managementsection look for the App passwordsoption (https://bitbucket.org/account/settings/app-passwords/)
- Create an app password with permissions at least to Readunder Repositoriessection. A password will be generated for you. Remember to save it, it will be shown only once!
- 登录比特桶
- 单击
右侧的个人资料图片(现在位于左下角) - 选择Bitbucket 设置
- 在访问管理部分下查找应用程序密码选项(https://bitbucket.org/account/settings/app-passwords/)
- 在Repositories部分创建一个至少具有读取权限的应用程序密码。将为您生成一个密码。记得保存它,它只会显示一次!
回答by Lucas Bustamante
It's March 2019, and I just did it this way:
现在是 2019 年 3 月,我就是这样做的:
- Access https://id.atlassian.com/login/resetpassword
- Fill your email and click "Send recovery link"
- You will receive an email, and this is where people mess it up. Don't clickthe Log in to my account button, instead, you want to click the small link bellow that says Alternatively, you can reset your passwordfor your Atlassian account.
- Set a password as you normally would
- 访问https://id.atlassian.com/login/resetpassword
- 填写您的电子邮件,然后单击“发送恢复链接”
- 你会收到一封电子邮件,这就是人们把它搞砸的地方。不要单击“登录我的帐户”按钮,而是要单击下面的小链接,上面写着“或者,您可以重置Atlassian 帐户的密码”。
- 像往常一样设置密码
Now try to run git commands on terminal.
现在尝试在终端上运行 git 命令。
It might ask you to do a two-step verification the first time, just follow the steps and you're done!
第一次可能会要求您进行两步验证,只需按照步骤操作即可!
回答by Crisoforo Gaspar
One way to skip this is by creating a specific app password variable.
跳过此操作的一种方法是创建特定的应用程序密码变量。
- Settings
- App passwords
- Create app password
- 设置
- 应用密码
- 创建应用密码
And you can use that generated password
to access or to push commits from your terminal, when using a Google Account to sign in into Bitbucket.
password
当使用 Google 帐户登录 Bitbucket 时,您可以使用生成的内容从终端访问或推送提交。
回答by vodolaz095
You can setup SSH key authorization like described here - https://confluence.atlassian.com/bitbucket/add-an-ssh-key-to-an-account-302811853.html.
您可以像这里描述的那样设置 SSH 密钥授权 - https://confluence.atlassian.com/bitbucket/add-an-ssh-key-to-an-account-302811853.html。
回答by Cristian Sepulveda
you don't have a bitbucket password because you log with google, but you can "reset" the password here https://bitbucket.org/account/password/reset/
您没有 bitbucket 密码,因为您使用谷歌登录,但您可以在此处“重置”密码https://bitbucket.org/account/password/reset/
you will receive an email to setup a new password and that's it.
您将收到一封用于设置新密码的电子邮件,仅此而已。
回答by Taslim Oseni
Update as at September, 2019:
截至 2019 年 9 月的更新:
This whole process is now way easier than it used to be. It doesn't matter if your auth style is regular or Google-dependent, it works regardless. Follow these four easy steps:
这整个过程现在比以前容易得多。无论您的身份验证风格是常规的还是依赖于 Google 的都没有关系,无论如何它都可以工作。遵循以下四个简单步骤:
- Visit this linkand enter your email.
- Check your mail for the reactivation email and click the big blue button therein.
- Change your password!
- 访问此链接并输入您的电子邮件。
- 检查您的邮件以获取重新激活电子邮件,然后单击其中的蓝色大按钮。
- 更改您的密码!
I hope this helps. Merry coding!
我希望这有帮助。快乐编码!
回答by HughHughTeotl
You can attach a "proper" Bitbucket account password to your account. Go to https://id.atlassian.com/manage/change-password(sign in using your Google account) and then enter a new password in both the old and new password boxes. Now you can use your email address and this new password to access your account on the command line.
您可以将“正确”的 Bitbucket 帐户密码附加到您的帐户。转至https://id.atlassian.com/manage/change-password(使用您的 Google 帐户登录),然后在旧密码和新密码框中输入新密码。现在您可以使用您的电子邮件地址和这个新密码在命令行上访问您的帐户。
Note: App passwords are the official way of doing this (per @Christian Tingino's answer), but IMO they don't work very nicely. No way of changing the password, and they are big unwieldly things to type into the command line.
注意:应用程序密码是执行此操作的官方方式(根据@Christian Tingino 的回答),但 IMO 它们不能很好地工作。无法更改密码,而且在命令行中输入它们是很笨重的事情。