Hi Tom,

I saw the thread and wanted to help clear up the confusion.

To answer your first question: for safety and code security, direct pushes to 
the main LinuxCNC/linuxcnc.git repository are restricted to core maintainers. 
Everyone else contributes by pushing code to their own personal fork and then 
submitting a Pull Request. This prevents accidental changes from breaking the 
main codebase.

The reason you are getting permission denied errors is because of how your 
local git remotes are configured. Based on the output you shared:

origin https://github.com/LinuxCNC/linuxcnc.git (fetch) origin 
https://github.com/LinuxCNC/linuxcnc.git (push) 

Your local origin is pointing directly to the main LinuxCNC repository. So, 
when you try to run git push origin..., Git is trying to write directly to the 
official project, which rejects it. You don't want to push there; you want to 
push to tjtr33/linuxcnc.

Here is how you fix your local repository so it points to the right places:

1. Rename the main repo to upstream

It's standard practice to keep a link to the main repo so you can pull the 
latest updates, but we usually call it upstream instead of origin. Run this in 
your terminal:

git remote rename origin upstream 

2. Add your fork as the new origin

Now, tell Git that origin should be your personal GitHub fork:

git remote add origin https://github.com/tjtr33/linuxcnc.git 

3. Verify your setup

Run git remote -v again. It should now look like this:

origin https://github.com/tjtr33/linuxcnc.git (fetch) origin 
https://github.com/tjtr33/linuxcnc.git (push) upstream 
https://github.com/LinuxCNC/linuxcnc.git (fetch) upstream 
https://github.com/LinuxCNC/linuxcnc.git (push) 

4. Push your code

Now that origin points to your fork, you can push your local branch. If you are 
working on a branch called master, you would run:

Bash

git push -u origin master 

(Note: If you are working on a differently named branch, replace master with 
your branch name).

Once that push succeeds, your code will be on your GitHub page, and you can 
click the "Compare & pull request" button on GitHub to send it to the main 
LinuxCNC project.

Hope this helps get you unstuck!


On March 13, 2026 1:13:51 PM GMT+08:00, Thomas J Powderly <[email protected]> 
wrote:
>Hello Nicklas,
>
>I reply in line...
>
>On 3/13/26 04:16, Nicklas SB Karlsson wrote:
>> git remote -v tell you about remote repositories, there may be more than 
>> one. For files I want to bring to workshop
>> machine I have two. One on ordinary computer with connection to internat and 
>> another on USB pin I could brin to workshop
>> with machines as I do not have internet there.
>
>cd linuxcnc-source-dir/
>. scripts/rip-environment
>git remote -v
>
>"""
>
>origin https://github.com/LinuxCNC/linuxcnc.git (fetch)
>origin https://github.com/LinuxCNC/linuxcnc.git (push)
>
>"
>
>I cannot push to
>
>https://github.com/LinuxCNC/linuxcnc.git
>
>or
>
>LinuxCNC/linuxcnc.git
>
>or
>
>LinuxCNC/linuxcnc
>
>or
>
>linuxcnc
>
>
>> Interested in output from git remote -v as it show name remote repository 
>> needed to get more information. I origin as
>> example for name of repository, to show tracking info where you push and 
>> pull use:
>>    git remote show origin
>git remote show origin
>* remote origin
>  Fetch URL: https://github.com/LinuxCNC/linuxcnc.git
>  Push  URL: https://github.com/LinuxCNC/linuxcnc.git
>  HEAD branch: master
>  Remote branches:
>
>..... too longe to post
>
>... but i do not see tjtr33/any nor linuxcnc in the long list
>
>../ I see Andy got username/branchname
>
>... so thw format uername/forkname is valid
>
>    andypugh/3395                                       tracked
>    andypugh/bring_back_RTAI                            tracked
>    andypugh/buildbot_test                              tracked
>
>but
>
>my GitHub Page (https://github.com/tjtr33/linuxcnc)
>has pon top left
>"""
>tjtr33 / linuxcnc    followed by ForkSymbol
>linuxcnc Public
>forked from LinuxCNC/linuxcnc
>"""
>
>> If it got it correct. On Github you made a local fork and you should push to 
>> this.
>
>Please,
>
> given the info above,
>
>I think my frok is  tjtr33/linuxcnc
>
>I thhink the push command should be
>
>git push origin tjtr33/linuxcnc
>
>but always that fails
>
>""""
>
> git push origin tktr33/linuxcnc
>error: src refspec tktr33/linuxcnc does not match any
>error: failed to push some refs to 'https://github.com/LinuxCNC/linuxcnc.git'
>"""
>
>So, I think o my command format  is wrong
>
>or 'originb' is wrong
>
>or 'tjtr33/linuxcnc' is weong.
>
>IMO tjtr44/linuxcnc is wrong
>
>despite GitHub's labeling my page that way
>
>and stamping it with 'forked from LinuxCNC.
>
>>   Then this is done you could make a
>> pull request.
>I think I cannot pull until after I  t push, correct?
>> 
>> Nicklas Karlsson
>> 
>Thnaks for replying
>
>TomP
>
>> tor 2026-03-12 klockan 20:38 +0000 skrev andy pugh:
>>> On Thu, 12 Mar 2026 at 18:42, Thomas J Powderly<[email protected]> wrote:
>>> 
>>>> git push --dry-run
>>>> remote: Permission to LinuxCNC/linuxcnc.git denied to tjtr33.
>>> It should be pushing to tjtr33/linuxcnc
>>> I don't know why it is trying to push to LinuxCNC/linuxcnc
>>> 
>>> What does "git remote -v" tell you?
>>> 
>> 
>> 
>> 
>> _______________________________________________
>> Emc-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>_______________________________________________
>Emc-developers mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/emc-developers

_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to