A writable git repo for collaboration and code dumps

260 views
Skip to first unread message

Isaac Levy

unread,
May 10, 2013, 4:19:56 AM5/10/13
to blink-dev
Hi all,

We now have a blink repository which accepts pushes by
chromium committers. This repository keeps refs/heads/*
closely in sync with the official git mirror (normal delay <5s).

Here's a quickstart guide for using:
1) Navigate to https://chromium.googlesource.com/, log in with your
    chromium account, click 'Generate New Password', and follow the
    instructions.
2) cd <blink_src>; git remote add -f wip https://chromium.googlesource.com/experimental/chromium/blink
<hack on some code, commit locally>
3) git push wip HEAD:refs/wip/ilevy/awyeah

This creates a publicly accessible branch. Any developer can pull
with: git fetch wip '+refs/wip/ilevy/awyeah:refs/heads/awyeah'

You can also run:
git config --add remote.wip.fetch '+refs/wip/ilevy/*:refs/wip/ilevy/*'
and then use 'git fetch wip'

Please restrict pushes to the refs/wip namespace, specifically in the
following format: refs/wip/<username or codeword>/<branch name>

That's all for now :-)

Cheers,
Isaac

====

FAQ:
Q: Why not change my origin url to the experimental remote?
A: Gclient sync will change origin back to the official mirror.
    Patches to gclient (specifically gclient_scm.py::update) are welcome.
Q: git push freezes!
A: The wip remote may be stale. Try running git fetch wip.
Q: How do I delete a branch?
A: Users with push also have delete (and force push) permissions.
    git push wip :refs/wip/ilevy/iaccedentally
Q: There's another chromium git repository that I want to collaborate on.
A: Send me an email.

Isaac Levy

unread,
May 10, 2013, 5:07:27 PM5/10/13
to Isaac Levy, blink-dev
Update: gclient patch has landed.  Improved workflow below:

Instead of adding a second remote, I'd suggest changing your origin
remote to the experimental branch.

Replace steps 2-3 with:

2) cd <blink src>; git config remote.origin.url https://chromium.googlesource.com/experimental/chromium/blink
3) git config remote.origin.gclient getoffmylawn
4) git remote update

Then push to origin instead of wip, i.e.: git push origin HEAD:refs/wip/ilevy/blah

Isaac Levy

unread,
May 21, 2013, 8:33:56 PM5/21/13
to Isaac Levy, blink-dev
Apologies, the magic git config entry to prevent gclient sync from resetting origin url has changed again.  The new instructions are:

2) cd <blink src>; git config remote.origin.url https://chromium.googlesource.com/experimental/chromium/blink
3) git config remote.origin.gclient-auto-fix-url False
4) git remote update

Alec Flett

unread,
Jun 10, 2013, 7:00:35 PM6/10/13
to Isaac Levy, blink-dev
I finally tried to use this today:
1) I created the new user/password
2) I tried to push a new branch in from my repo:

$ git push -u wip navcontroller
Counting objects: 33521, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (11367/11367), done.
Writing objects: 100% (29104/29104), 35.30 MiB | 15.96 MiB/s, done.
Total 29104 (delta 23008), reused 23106 (delta 17529)
remote: Resolving deltas: 100% (23008/23008)
remote: Replicating objects... done.
 ! [remote rejected] navcontroller -> navcontroller (read-only)

Are we not allowed to create branches in the new repository?

Also, I closed the tab that had the username/password and now I have no idea where to retrieve that from or create a new username/password..

Alec

Bem Jones-Bey

unread,
Jun 11, 2013, 9:29:25 AM6/11/13
to Alec Flett, Isaac Levy, blink-dev
You need to push to a specific namespace:

3) git push wip HEAD:refs/wip/ilevy/awyeah

This creates a publicly accessible branch. Any developer can pull
with: git fetch wip '+refs/wip/ilevy/awyeah:refs/heads/awyeah'

You can also run:
git config --add remote.wip.fetch '+refs/wip/ilevy/*:refs/wip/ilevy/*'
and then use 'git fetch wip'

Please restrict pushes to the refs/wip namespace, specifically in the
following format: refs/wip/<username or codeword>/<branch name>

So you should be doing something like:

git push wip HEAD:refs/wip/alecflett/navcontroller

However, if you've changed your origin as described below, you'll need to use something more like: (though from the command you gave, it doesn't look like this applies)

git push origin HEAD:refs/wip/alecflett/navcontroller

Hope that helps,
Bem

j...@chromium.org

unread,
Aug 23, 2013, 9:49:03 PM8/23/13
to blin...@chromium.org, Alec Flett, Isaac Levy
So I'm trying to setup an experimental branch, and I'm getting a "fatal: remote error: Git access forbidden" when I try to push. I know this is a lame thing to say, but I'm pretty confident I've followed ilevy's instructions to the 't', and I've tried several times at this point. Has anything changed with these repos, or am is this a "good back and try again because you're clearly screwing something obvious up" kind of moment? Here are the commands I've run (in order, after CD'ing into my Blink src and putting my creds in .netrc):
git config --add remote.wip.fetch '+refs/wip/jww/*:refs/wip/jww/*'
git fetch wip
git push wip HEAD:refs/wip/jww/testbranch

On Tuesday, June 11, 2013 6:29:25 AM UTC-7, Bem Jones-Bey wrote:
You need to push to a specific namespace:

3) git push wip HEAD:refs/wip/ilevy/awyeah

This creates a publicly accessible branch. Any developer can pull
with: git fetch wip '+refs/wip/ilevy/awyeah:refs/heads/awyeah'

You can also run:
git config --add remote.wip.fetch '+refs/wip/ilevy/*:refs/wip/ilevy/*'
and then use 'git fetch wip'

Please restrict pushes to the refs/wip namespace, specifically in the
following format: refs/wip/<username or codeword>/<branch name>

So you should be doing something like:

git push wip HEAD:refs/wip/alecflett/navcontroller

However, if you've changed your origin as described below, you'll need to use something more like: (though from the command you gave, it doesn't look like this applies)

git push origin HEAD:refs/wip/alecflett/navcontroller

Hope that helps,
Bem


On Jun 10, 2013, at 16:01, "Alec Flett" <alec...@chromium.org> wrote:

I finally tried to use this today:
1) I created the new user/password
2) I tried to push a new branch in from my repo:

$ git push -u wip navcontroller

Dominic Cooney

unread,
Aug 23, 2013, 9:54:28 PM8/23/13
to j...@chromium.org, blink-dev, Alec Flett, Isaac Levy
I had a permissions problem out of the box, and it turned out to be because my @google.com address and not my @chromium.org address had been added to commi...@chromium.org. Asking mal nicely rectified this.

So... it might be that. YMMV.

Dominic

Joel Weinberger

unread,
Aug 23, 2013, 10:42:54 PM8/23/13
to Dominic Cooney, blink-dev, Alec Flett, Isaac Levy
Ah, there's the problem... I'm not a committer yet :-) I didn't realize that I needed to be a committer to push an experimental branch. Problem solved, thanks!
--Joel

Isaac Levy

unread,
Aug 23, 2013, 11:00:03 PM8/23/13
to Joel Weinberger, Dominic Cooney, blink-dev, Alec Flett, Isaac Levy
Right. If this is an issue for others, we could consider setting up a whitelist group.  Maybe it's time to become a committer :-)
Reply all
Reply to author
Forward
0 new messages