Adding credentials to my pencil code git

4 views
Skip to first unread message

Carolina Ortiz Rodriguez

unread,
Oct 29, 2025, 1:38:13 PMOct 29
to pencil-co...@googlegroups.com
Hello, 

I cloned the Pencil Code using git clone without a username. Now I have an account, and I am trying to push. Could you please tell me how to add the credentials so I can push?

The remote is this: 

origin https://pencil-code.org/git/ (fetch)

origin https://pencil-code.org/git/ (push)



Below is the message when trying to push. 

Enumerating objects: 15, done.

Counting objects: 100% (15/15), done.

Delta compression using up to 8 threads

Compressing objects: 100% (8/8), done.

Writing objects: 100% (8/8), 797 bytes | 797.00 KiB/s, done.

Total 8 (delta 6), reused 0 (delta 0), pack-reused 0

Username for 'https://pencil-code.org': caro-ortiz         

Password for 'https://caro-...@pencil-code.org': 

error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401

send-pack: unexpected disconnect while reading sideband packet

fatal: the remote end hung up unexpectedly

Everything up-to-date


Thank you in advance.


Best regards,

Carolina Ortiz Rodriguez

Kishore G

unread,
Oct 30, 2025, 1:09:09 AMOct 30
to Carolina Ortiz Rodriguez, pencil-co...@googlegroups.com
> I cloned the Pencil Code using git clone without a username. Now I have an
> account, and I am trying to push.

What you are doing should work (at least, pushing works for me even if I don't
specify the username while cloning, as long as I input the username and
password while pushing). The error message suggests that either the username
or the password is incorrect.

--
Kishore G.


Carolina Ortiz Rodriguez

unread,
Oct 30, 2025, 12:38:43 PMOct 30
to Kishore G, pencil-co...@googlegroups.com
Hi Kishore,

Thanks for your reply. The username and password are correct. I will see if it works the next time I try to push. 

Cheers,
Carolina

Philippe-A. Bourdin

unread,
Oct 30, 2025, 12:55:17 PMOct 30
to pencil-code-discuss
Hi Carolina,

the best way to add you credentials is to either check out initially with your username in the URL:
https://pencil-code.org/download.php

But if you have already done so without the username, you may easily add it to your local or global git configuration:
git config --global user.name "Alice Wonderland"
git config --global user.email "al...@wonder.land"
(Leave away the "--global" if you want to configure this only for one repository.)

Please always make sure your email is the same as with your Pencil Code account and you GitHub account.

Thanks and best greetings,
Philippe

Philippe-A. Bourdin

unread,
Oct 30, 2025, 1:08:54 PMOct 30
to pencil-code-discuss
And of course you change the URL to the one with your PC username like this:
git remote set-url origin https://al...@pencil-code.org/git/
Reply all
Reply to author
Forward
0 new messages