【问题标题】:Pushing code to google source repos error将代码推送到谷歌源代码库错误
【发布时间】:2020-07-30 15:04:30
【问题描述】:

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

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 文件中,但我仍然遇到同样的错误。

【问题讨论】:

    标签: git google-cloud-platform google-cloud-source-repos google-source-repositories


    【解决方案1】:

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

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

    最初是因为我看到了 powershell 并且我使用了 powershell 甚至 git bash 但它们都不起作用。

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

    【讨论】:

    • 在哪里可以找到 windows 用户部分?我也想看看那里发生了什么,因为您的回答没有意义,而且对我不起作用。
    • 在 gcp 源 repos 上创建 repo 后,您应该被定向到包含如何克隆 repo 信息的页面。阅读包含该信息的部分,您应该会看到一个显示 Windows 信息的部分。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-22
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-10
    相关资源
    最近更新 更多