自 Atlassian 于 2022 年 3 月更改应用程序密码以来,Windows 10 上的 Git bash 不再适用于 Bitbucket

发布于 2025-01-15 11:25:07 字数 5854 浏览 1 评论 0原文

<块引用>

我已经阅读了 100 篇帖子,并尝试了数十种方法,让 Windows 10 和我的 git bash 推送能够与 Bitbucket Cloud 配合使用,并于 2022 年 3 月 1 日强制执行他们的应用程序密码强制要求。我决定联系在我伤害显示器、笔记本电脑或我自己之前向堆栈团队报告。 10个小时后我放弃了。认罪。

使用 git bash:
$ git push -u origin master

让我明白:

远程:Bitbucket Cloud 最近停止支持 Git 身份验证的帐户密码。
远程:请参阅我们的社区帖子了解更多详细信息: https://atlassian.community/t5/x/x/ba-p/ 1948231
远程:建议大多数使用情况使用应用程序密码,并且可以在您的个人中创建 设置:
远程:https://bitbucket.org/account/settings/app-passwords/
致命:“https://bitbucket.org/myWorkspace/myRepo.git/”身份验证失败

  • Windows 10
  • git bash 版本 2.35.1.windows.2
  • 使用 bitbucket Web 界面查看我的存储库并添加应用程序 密码 --- https://bitbucket.org/
  1. 我的 bitbucket 帐户包含我的工作电子邮件地址和与其关联的用户名。
  2. 我有一个 Bitbucket Cloud 工作区、项目和存储库,我已经投入使用多年了。
  3. 我使用 Visual Studio 和 Git Bash 来访问此存储库。
  4. 我没有创建存储库。我们公司的管理员做到了。
  5. 我是该存储库的唯一用户,也是唯一推送到该存储库的用户 ID。

当我尝试自 2021 年 12 月以来的第一次提交和推送时,VS2019 和 Git Bash 两种访问方法都在 3 月 10 日左右停止工作。

自从 3 月 10 日我第一次犯错以来。
我已通过 bitbucket Web 界面添加了应用程序密码:

1 - 左键单击 bitbucket 网页左下角我的头像
2 - 选择个人设置
3 - 选择左侧的应用程序密码
4 - 单击蓝色的“创建应用程序密码”按钮

5 - 标记为:GitBash

6 -选择了以下所有权限 -

帐户

 x - 电子邮件
 x - 读
 x - 写

工作区会员资格

<前><代码> x - 读取 x - 写

项目

<前><代码> x - 读取 x - 写

存储库

<前><代码> x - 读取 x - 写 x - 管理员 不 - 删除

拉取请求

<前><代码> x - 读取 x - 写

7 -然后点击蓝色的“创建”按钮。

8 - 然后我看到显示 20 个字符密码的屏幕。我暂时将其复制到记事本中,然后放入下面的git命令中:

 $ git Remote set-url origin https://myUserid:[电子邮件受保护]/my-workspace/myrepo.git
<块引用>

然后我再次尝试推送:

<代码> $ git push -u origin master
<块引用>

并获取响应:

远程:Bitbucket Cloud 最近停止支持 Git 身份验证的帐户密码。
远程:请参阅我们的社区帖子了解更多详细信息:https://atlassian.community/ t5/x/x/ba-p/1948231
远程:建议大多数使用情况使用应用程序密码,并且可以在您的个人设置中创建: 远程:https://bitbucket.org/account/settings/app-passwords/
致命:“https://bitbucket.org/myWorkspace/myRepo.git/”身份验证失败

 $ git config --global --list
<块引用>

core.editor="C:\Users\first last\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=myUserid
[电子邮件受保护]
credential.bitbucketauthmodes=基本
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd=''
mergetool.sourcetree.trustexitcode=true

<前><代码> $ git远程-v <块引用>

来源 https://myUserid:[电子邮件受保护]/my-workspace/my-repo.git (获取)
来源 https://myUserid:[电子邮件受保护]/my-workspace/my-repo.git (推)

remote -v 的输出与我使用 $ git remote set-url 命令设置的输出完全相同。

<前><代码> $ git config --list <块引用>

http.sslbackend=openssl http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
credential.helper=manager-core
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs 涂抹 -- %f
filter.lfs.process=git-lfs 过滤器进程
filter.lfs.required=true core.autocrlf=true core.fscache=true
core.symlinks=false pull.rebase=false
凭据。https://dev.azure.com.usehttppath=true
init.defaultbranch=master core.editor="C:\Users\my-first Wilson\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=bwilson [电子邮件受保护]
credential.bitbucketauthmodes=基本
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd='' mergetool.sourcetree.trustexitcode=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
子模块.active=.
remote.origin.url=https://myUserid:[电子邮件受保护]/myWorkspace/myRepo.git

<块引用>

remote.origin.fetch=+refs/heads/:refs/remotes/origin/

C:\Users<用户名>.git-credentials

其中有一条记录:

<块引用>

https://myUserid:[电子邮件受保护]

我已经编码了几十年,但还没有使用 git 和 bitbucket 做过很多工作,所以我确信这就是我,但我需要一些帮助。我将回答任何问题,进行任何测试并提供任何结果。谢谢!

I have read 100's of posts and tried dozens of things, give or take, to get Windows 10 and my git bash push to work with the Bitbucket Cloud and their App password mandate enforced on March 1st 2022. I decided to reach out to the stack team before I harm a monitor, laptop or myself. 10 hours in and I give up. Mea Culpa.

Using git bash:
$ git push -u origin master

Gets me:

remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details:
https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal
settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/myWorkspace/myRepo.git/'

  • Windows 10
  • git bash version 2.35.1.windows.2
  • using bitbucket web interface to view my repositories and add app
    passwords --- https://bitbucket.org/
  1. My bitbucket account has my work email address and a username associated with it.
  2. I have a Bitbucket Cloud workspace, project and repository that I have been pushing into for several years.
  3. I have used both Visual Studio and Git Bash to access this repository.
  4. I did not create the repository. Our company admin did.
  5. I am the only user of the repository and the only userid that has ever pushed to it.

Both access methods VS2019 and Git Bash quit working for me around Mar. 10th when I tried my first Commit and Push since Dec2021.

Since my first error on March 10th.
I have added an app password via bitbucket web interface by:

1 - Left click my avatar lower left of bitbucket web page
2 - Select Personal Settings
3 - Select App Passwords on the left
4 - Click Blue Create App Password button

5 - Labeled it: GitBash

6 - Selected all the permissions below -

Account

 x - Email
 x - Read
 x - Write

Workspace membership

 x - Read
 x - Write

Projects

 x - Read
 x - Write

Repositories

 x - Read
 x - Write
 x - Admin
 not - Delete

Pull requests

 x - Read
 x - Write

7 - Then hit the blue Create button.

8 - I then got the screen that displayed the 20 char password. I copied it to notepad temporarily and then put it in the git command below:

 $ git remote set-url origin https://myUserid:[email protected]/my-workspace/myrepo.git

I then try my push again:

 $ git push -u origin master

and get the response:

remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/myWorkspace/myRepo.git/'

 $ git config --global --list

core.editor="C:\Users\first last\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=myUserid
[email protected]
credential.bitbucketauthmodes=basic
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd=''
mergetool.sourcetree.trustexitcode=true

 $ git remote -v  

origin https://myUserid:[email protected]/my-workspace/my-repo.git
(fetch)
origin https://myUserid:[email protected]/my-workspace/my-repo.git
(push)

The output from the remote -v is exactly as I set it up with the $ git remote set-url command.

 $ git config --list  

http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
credential.helper=manager-core
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true core.autocrlf=true core.fscache=true
core.symlinks=false pull.rebase=false
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master core.editor="C:\Users\my-first Wilson\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=bwilson [email protected]
credential.bitbucketauthmodes=basic
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd='' mergetool.sourcetree.trustexitcode=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
submodule.active=.
remote.origin.url=https://myUserid:[email protected]/myWorkspace/myRepo.git

remote.origin.fetch=+refs/heads/:refs/remotes/origin/

C:\Users<username>.git-credentials

has one record in it:

https://myUserid:[email protected]

I have been coding for decades but haven't done a lot with git and bitbucket so I'm sure this is me, but I could use some help. I will answer any questions, run any tests and provide any results. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文