git - 将代码推送到谷歌源代码库错误
问题描述
将更改推送到我的云源存储库时出现以下错误。
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 链接生成一个新的 .gitcookies 标识符并在使用命令行对我的帐户进行身份验证后执行命令(示例如下)来解决这个问题。
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
powershell -noprofile -nologo -command Write-Output ...
最初是因为我看到了 powershell 并且我使用了 powershell 甚至 git bash 但它们都不起作用。
我发现对于 windows 用户,只需复制 windows 用户部分的命令并粘贴到 windows 命令行中,而不是 powershell 或 git bash。
推荐阅读
- c# - FirstOrDefault() 导致 Collection 被修改;枚举操作可能无法执行。例外
- snowflake-sql - 在特定事件之后的行 FOR A KEY
- php - 使用googlespreadsheet api v4批量更新单个单元格?
- r - 如何使用 R 中的 Hayes Process 更改调解调解的调解人值
- algorithm - 对于两个非负函数 f 和 g,如果 f = O(g) 和 g = O(f) 并且 ∀n,f(n) > g(n) 则证明或反证 f - g = O(1)
- reactjs - 如果提供了某些值,有没有办法使所需的打字稿值可选?
- firebase - 我遇到“错误:没有为类型“对象”定义运算符“[]”。我该如何解决这个问题?
- azure - Azure 二头肌资源模块的依赖性问题
- react-native - Trouble migrating React Navigation v4 Deep Link configuration to React Navigation v5
- shell - 如何使别名不立即执行