如何克服git上认证失败的错误?

问题描述 投票:0回答:1

我想把本地的repo内容推送到远程的bitbucket上。我收到一个输入用户名的 bitbucket 对话框(但那不是我正确的用户名),要求输入密码,但我得到的是错误信息。

$ git push
remote: Invalid username or password
fatal: Authentication failed for 'https://bitbucket.org/88888888/8888888.g
git authentication push
1个回答
0
投票

首先,为了避免冲突,用这个命令配置git。

 $ git config --global user.name "yourusername"
$ git config --global user.email "[email protected]"

在命令行,确定你已经进入了版本库目录。

在命令行输入 git push,将你的提交从本地仓库推送到 Bitbucket。要明确推送的具体位置,输入 git push 。这条命令指定了你要推送的对象。

remote_server - 远程服务器的名称。在大多数情况下,origin 表示你要推送到 Bitbucket。

branch_name - 你做了修改并想推送的仓库分支。分支允许你在独立于主干的版本库中进行一系列的代码工作。代码库.

在这个例子中,origin是远程服务器,master是你所在的分支。推动:

在git repo中

git push

git remote origin "repo link" git push origin master

汞回收

hg add --all hg commit -m "message" hg push

© www.soinside.com 2019 - 2024. All rights reserved.