More git weirdness

Andrew Dinn adinn at redhat.com
Tue Jan 24 17:50:10 UTC 2017


On 24/01/17 16:45, Doug Simon wrote:
> 
>> On 24 Jan 2017, at 17:35, Andrew Haley <aph at redhat.com> wrote:
>>
>> Just when I think I'm over the bumps:
>>
>> mercury:aph $ git clone https://git@github.com/theRealAph/graal-core
>> Initialized empty Git repository in /home/graal/aph/graal-core/.git/
>> remote: Counting objects: 304672, done.
>> remote: Total 304672 (delta 0), reused 0 (delta 0), pack-reused 304672
>> Receiving objects: 100% (304672/304672), 36.80 MiB | 4.60 MiB/s, done.
>> Resolving deltas: 100% (142045/142045), done.
>>
>> mercury:aph $ cd graal-core/
>>
>> mercury:graal-core $ git remote add master https://github.com/graalvm/graal-core
>>
>> mercury:graal-core $ git fetch master
>> remote: Counting objects: 4292, done.
>> remote: Compressing objects: 100% (322/322), done.
>> remote: Total 4292 (delta 1767), reused 1640 (delta 1640), pack-reused 2034
>> Receiving objects: 100% (4292/4292), 1.06 MiB | 916 KiB/s, done.
>> Resolving deltas: 100% (1819/1819), completed with 419 local objects.
>> From https://github.com/graalvm/graal-core
>> * [new branch]      master     -> master/master
>> * [new tag]         JDK-8166417 -> JDK-8166417
>> * [new tag]         graal-vm-0.18 -> graal-vm-0.18
>>
>> mercury:graal-core $ git merge master/master
>> Updating 03d3f8c..576bb34
>> Checking out files: 100% (5285/5285), done.
>> Fast-forward
>> ...
>>
>> mercury:graal-core $ git push
>> error: The requested URL returned error: 403 Forbidden while accessing https://git@github.com/theRealAph/graal-core/info/refs
>>
>> fatal: HTTP request failed
>>
>> Umm, what?  Is there something else I should know?
> 
> I think you need to push with ssh URLs (e.g., ssh://git@github.com:graalvm/graal-core.git).

Indeed you really ought to have cloned it in the first place using the
ssh://.../ format URL then our repo's origin URL would be in ssh format.
You can use command 'git remote' to reset your origin URL. Run

$ git remote --help

for details.

n.b. details of what remot repos are in use is actually stored in file
.git/config so if you are feeling brave you could just tweak that by
hand to replace

  https://github.com:/theRealAph/graal-core.git

with

  git at github.com:theRealAph/graal-core.git

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the graal-dev mailing list