将代码推送到 google 源代码库错误

Pushing code to google source repos error

将更改推送到我的云源存储库时出现以下错误..

remote: INVALID_ARGUMENT: Request contains an invalid argument.
remote: [type.googleapis.com/google.rpc.LocalizedMessage]
remote: locale: "en-US"
remote: message: "Invalid authentication credentials. Please generate a new identifier: https://source.developers.google.com/new-password"      
remote:
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "xxxxx"
fatal: unable to access 'https://source.developers.google.com/p/xxx/repository/': The requested URL returned error: 400

然后我继续生成新密码并存储在 .gitcookies 文件中,但我仍然遇到相同的错误。

我通过使用 Generate new identifier link 生成一个新的 .gitcookies 标识符并执行在使用命令行对我的帐户进行身份验证后给出的命令(示例如下)解决了这个问题。

git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
powershell -noprofile -nologo -command Write-Output ...

最初因为看到powershell什么的就用powershell甚至gitbash但是都没有用

我发现对于 windows 用户,只需复制 windows 用户部分的命令并粘贴到 windows 命令行而不是 powershell 或 git bash.