OPNsense Forum

English Forums => Development and Code Review => Topic started by: opnsense_user12123 on January 28, 2018, 08:08:43 pm

Title: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 08:08:43 pm
Code: [Select]
git push --set-upstream origin cicada
remote: Permission to opnsense/plugins.git denied to opnsenseuser12123.
fatal: unable to access 'https://github.com/opnsense/plugins.git/': The requested URL returned error: 403
Title: Re: can´t push to github
Post by: franco on January 28, 2018, 09:11:05 pm
Hi there,

You want to fork plugins to your GitHub account and create a PR (pull request) to the official OPNsense plugins repo with that fork.


Cheers,
Franco
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 09:37:01 pm
Hi there,

You want to fork plugins to your GitHub account and create a PR (pull request) to the official OPNsense plugins repo with that fork.


Cheers,
Franco

If i go to github and choose "new pull request" what do i have to select ?

what of these do i have to select?



    Example comparisons
    stable/18.1  a day ago
    stable/17.7  15 days ago
    harden_scp_backup  22 days ago
    stable/17.1  on 23 Jul 2017
    stable/16.7  on 3 Jan 2017
    master@{1day}...master  24 hours ago


Can´t find a plugins folder or a misc folder ?
Can i do a pull request with a syntax to ?

thx
Title: Re: can´t push to github
Post by: franco on January 28, 2018, 09:47:08 pm
When you push your branch, it should light up on your plugin repo automatically asking you to perform a request.

Can't be missed when you browse your GitHub.


Cheers,
Franco
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 09:49:47 pm
When you push your branch, it should light up on your plugin repo automatically asking you to perform a request.

Can't be missed when you browse your GitHub.


Cheers,
Franco

if i try to push i get this error message (screenshot)

Title: Re: can´t push to github
Post by: franco on January 28, 2018, 09:51:39 pm
Interpolating from your screenshot...

https://github.com/opnsense_user12123

That gives a 404... Do you have a GitHub account yet?


Cheers,
Franco
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 09:53:22 pm
yes. and it´s already activated. i can also login into github. but i´m only able to pull but not push!
Title: Re: can´t push to github
Post by: franco on January 28, 2018, 09:53:58 pm
So what's your account name?
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 09:55:10 pm
opnsenseuser12123
Title: Re: can´t push to github
Post by: franco on January 28, 2018, 09:59:37 pm
Okay, you haven't worked plugins yet... https://github.com/opnsenseuser12123?tab=repositories

Go to https://github.com/opnsense/plugins and click "Fork" top right corner.


Cheers,
Franco
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 10:05:08 pm
ok, i did it. but if i push i get the same error as before!
Title: Re: can´t push to github
Post by: fabian on January 28, 2018, 10:18:26 pm
can you try the following:

git remote set-url origin git@github.com:opnsenseuser12123/plugins.git

then "git push -u origin your_branch_name"
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 28, 2018, 10:27:55 pm
i will give it a try tomorrow.....i have to go to sleep :-(........ thx Fabian!!
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 29, 2018, 03:51:26 pm
can you try the following:

git remote set-url origin git@github.com:opnsenseuser12123/plugins.git

then "git push -u origin your_branch_name"

Now i´m able to push to https://github.com/opnsenseuser12123/plugins.git
But i have not uploaded anything yet!

I do not quite understand that!

1. I thought i have to push this to https://github.com/opnsense/plugins?
2. Whats the difference between https://github.com/opnsense/plugins and https://github.com/opnsenseuser12123/plugins.git ?
3. Can anyone else then access my upload and help fixing some issues too ?

thx Fabian for your support! :-)
Title: Re: can´t push to github
Post by: fabian on January 29, 2018, 06:00:49 pm
Now i´m able to push to https://github.com/opnsenseuser12123/plugins.git
But i have not uploaded anything yet!
Sounds good - so there was a misconfiguration in your local git repository

1. I thought i have to push this to https://github.com/opnsense/plugins?
You cannot directly push into this repository because you don't have the permission to do so.
If you create a fork, it belongs to you and you can do with it whatever you want.
This protection prevents vandalism etc.
2. Whats the difference between https://github.com/opnsense/plugins and https://github.com/opnsenseuser12123/plugins.git ?
It is a different repository. opnsense/plugins belongs to the OPNsense group and some group members can write to it while opnsenseuser12123/plugins is yours. You can set the permissions etc. and you can rename or delete it for example. Whatever you do with your repository, you cannot break opnsense/plugins. If you want us to add some code from opnsenseuser12123/plugins to opnsense/plugins, you will have to create a pull request (PR) and the data will be available for review and if it passes, it will be merged (copy of the difference).
3. Can anyone else then access my upload and help fixing some issues too ?
Yes - via pull requests or if you add them to your repository with write access. It is your decision.
How you are going to work is a question of trust.
Title: Re: can´t push to github
Post by: opnsense_user12123 on January 29, 2018, 06:38:12 pm
Big THX Fabian for you support. You helped me a lot! :-)
Title: Re: can´t push to github
Post by: opnsense_user12123 on February 12, 2018, 06:49:45 am
is my private github fork of the the plugin-repository from opnsense automatically updated with the newest stuff or do i have to click on the fork-button from time to time to sync with my private github repo ?

thx guys!
Title: Re: can´t push to github
Post by: theq86 on February 12, 2018, 11:29:00 am
Your fork does not automatically update from the upstream repository.
You need to manually update all branches.

https://help.github.com/articles/syncing-a-fork/

You can not just push the fork button again to get the updates. You can sure delete your fork and fork it again, but you will lose all changes that you have made to your fork, unless all your changes did get upstream via pull requests.

So you really want to update your fork using the manual I posted above.

Also, if you worked a long time on your fork and if fork and upstream have not synced over a longer period, you may get merging conflicts that you need to resolve yourself.
Title: Re: can´t push to github
Post by: opnsense_user12123 on February 12, 2018, 05:46:53 pm
thx for your help! :-)

i´m only working on a css-template. Should not be a big problem!
i´m doing my template with the latest development build.
it´s impossible to be on the latest version for the whole project.

So i hope this will also fit for the release of version 18.7.!

-> What does push to or fetch from upstream mean ?
-> What´s the difference to usual push or pull ?

i´m using eclipse for developing!

thx