Credential issues when using "git cl upload"

1,995 views
Skip to first unread message

YouRen Chen

unread,
Apr 29, 2019, 5:03:21 PM4/29/19
to chromi...@chromium.org

Hello,

I am trying to make some changes to the Chromium browser,  but I'm running into some issues. I'm kind of stuck on "git cl upload", every time I run the command, I am told that:

"Credentials for the following hosts are required:
https://chromium-review.googlesource.com/
https://chromium.googlesource.com/
"

 

I generated my credentials by going to:
https://chromium-review.googlesource.com/new-password
and ran the given script, but I still get the same credential issue.
I have checked that the script runs properly and if it helps, I am running this on a Ubuntu system.

 

Regards,

--
You Ren (Joey) Chen
Chrome OS Engineering
Dell | Client Product Group

Jeremy Roman

unread,
Apr 29, 2019, 8:45:58 PM4/29/19
to youre...@dell.corp-partner.google.com, Chromium-dev
Output of "git cl creds-check"? Should be something like:

git is already configured to use your .gitcookies from /path/to/your/home/directory/.gitcookies
Your .netrc and .gitcookies have credentials for these hosts:
                                   Host                     User         Which file
======================================= ========================        ===========
              chromium.googlesource.com git-jbroman.chromium.org        .gitcookies

No problems detected in your .gitcookies file.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGwM7jMPks6N830rn6aDbpUNNuDq70ORUWyT%3DdNWEomF5oxtCw%40mail.gmail.com.

Jeremy Roman

unread,
Apr 30, 2019, 2:27:24 PM4/30/19
to YouRen Chen, Chromium-dev, infr...@chromium.org
+chromium-dev again, +infra-dev in case there's something in the infra that gets confused by your email being in a google.com subdomain

It looks like you're authenticated only to the chrome-internal repository but not to the public chromium repository. Does https://chromium-review.googlesource.com/new-password properly give you credentials for chromium-review.googlesource.com and chromium.googlesource.com?

On Tue, Apr 30, 2019 at 11:33 AM YouRen Chen <youre...@dell.corp-partner.google.com> wrote:
This is what I got

git is already configured to use your .gitcookies from /home/yourenchen/.gitcookies

Your .netrc and .gitcookies have credentials for these hosts:
                                   Host                                            User     Which file
=======================================    ============================================    ===========
chrome-internal-review.googlesource.com    git-youren.chen.dell.corp-partner.google.com    .gitcookies
       chrome-internal.googlesource.com    git-youren.chen.dell.corp-partner.google.com    .gitcookies


.gitcookies problem report:

  These hosts likely use wrong identity:

    chrome-internal.googlesource.com    git-youren.chen.dell.corp-partner.google.com but google.com recommended

  You can manually remove corresponding lines in your /home/yourenchen/.gitcookies file and visit the following URLs with correct account to generate correct credential lines:

    https://chrome-internal-review.googlesource.com/new-password

YouRen Chen

unread,
Apr 30, 2019, 3:26:51 PM4/30/19
to Jeremy Roman, infr...@chromium.org, chromi...@chromium.org
I'm not sure how to tell if it properly gives me the credentials. This is the script I received from https://chromium-review.googlesource.com/new-password:

eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
 touch ~/.gitcookies
 chmod 0600 ~/.gitcookies

 git config --global http.cookiefile ~/.gitcookies

 tr , \\t <<\__END__ >>~/.gitcookies
chromium.googlesource.com,FALSE,/,TRUE,2147483647,o,git-youren.chen.dell.corp-partner.google.com=1/6bhRLXF1nWHi6wMHpvqm2yMR2kmLEDdKPJCXRkhwtIY
chromium-review.googlesource.com,FALSE,/,TRUE,2147483647,o,git-youren.chen.dell.corp-partner.google.com=1/6bhRLXF1nWHi6wMHpvqm2yMR2kmLEDdKPJCXRkhwtIY
__END__
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null

Jeremy Roman

unread,
Apr 30, 2019, 4:12:54 PM4/30/19
to YouRen Chen, infr...@chromium.org, Chromium-dev
Running that script should put entries in your ~/.gitcookies (i.e., it should have lines which begin with "chromium.googlesource.com" and "chromium-review.googlesource.com"), which should in turn be visible to "git cl creds-check". If you've run the script and you're still not seeing them in the output of creds-check, then I'm not sure what's going on, sorry.

You can also try running "depot-tools-auth login chromium-review.googlesource.com" to also get OAuth credentials, but I don't think that should affect the upload process, just some other operations.

On Tue, Apr 30, 2019 at 3:25 PM YouRen Chen <youre...@dell.corp-partner.google.com> wrote:
I'm not sure how to tell if it properly gives me the credentials. This is the script I received from https://chromium-review.googlesource.com/new-password:

eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
 touch ~/.gitcookies
 chmod 0600 ~/.gitcookies

 git config --global http.cookiefile ~/.gitcookies

 tr , \\t <<\__END__ >>~/.gitcookies
chromium.googlesource.com,FALSE,/,TRUE,2147483647,o,git-youren.chen.dell.corp-partner.google.com=1/6bhRLXF1nWHi6wMHpvqm2yMR2kmLEDdKPJCXRkhwtIY
chromium-review.googlesource.com,FALSE,/,TRUE,2147483647,o,git-youren.chen.dell.corp-partner.google.com=1/6bhRLXF1nWHi6wMHpvqm2yMR2kmLEDdKPJCXRkhwtIY
__END__
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null

^ Don't share your gitcookies themselves publicly: they allow the bearer to authenticate on your behalf. Please click the "Revoke cookies" button on the new-password page to invalidate these cookies now that you've shared them publicly.

YouRen Chen

unread,
Apr 30, 2019, 4:41:35 PM4/30/19
to Jeremy Roman, chromi...@chromium.org
Sorry about that, I have revoked my googlesource cookies. I think the issue may have to do with the account I'm using, would it be better if I registered for a Chromium account and attempt the authentication using that account? Also, is it possible that I edit the previous script out of the post? For some reason, I cannot post/edit on the forum directly and thus have to respond by email. 

Danny Eldridge

unread,
Sep 15, 2020, 8:24:41 PM9/15/20
to Chromium-dev, youren.chen, Jeremy Roman
@Youren.chen, did you ever find a solution for getting past this step? I am similarly stuck, unable to get past the 'cl upload' step. 

@Jeremy perhaps you can lend a hand? 

My terminal output:

These hosts likely use wrong identity:

I've followed the instructions at `https://chromium-review.googlesource.com/new-password` to no avail. 

Dirk Pranke

unread,
Sep 15, 2020, 10:24:16 PM9/15/20
to m...@heardanieljames.com, Chromium-dev, youren.chen, Jeremy Roman
Are you sure the credential you're trying to use to upload the change matches the local user name and email address you're using in your git commits?

-- Dirk

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/09717b88-96af-4a98-97c7-ccc7eaf20764n%40chromium.org.

Danny Eldridge

unread,
Sep 17, 2020, 12:31:16 AM9/17/20
to Chromium-dev, Dirk Pranke, Chromium-dev, youren.chen, Jeremy Roman, Danny Eldridge
When I run `git config user.email` and `git config user.name` they are both correctly set to the same name/email that is set at `https://gerrit-review.googlesource.com/`

I've followed the steps listed at `https://chromium-review.googlesource.com/new-password` but I get the same result. 

This is the terminal response :

.gitcookies problem report:
These hosts likely use wrong identity:

Dirk Pranke

unread,
Sep 17, 2020, 12:40:20 PM9/17/20
to Danny Eldridge, Chromium-dev, youren.chen, Jeremy Roman
I'm not sure offhand. 

Can you file a bug using crbug.com/new so we can get this in front of the right people?

-- Dirk
Reply all
Reply to author
Forward
0 new messages