desihub / specsim

Quick simulations of spectrograph response
2 stars 9 forks source link

Bsipocz update helpers v2.0.1 #80

Closed dkirkby closed 7 years ago

dkirkby commented 7 years ago

Small modification to #79 (since I don't have write privs on @bsipocz's version of the branch).

bsipocz commented 7 years ago

hmm, this is weird, you should have able to push changes to my branch as a maintainer here, at list the Allow edits from maintainers. box is ticked over there.

dkirkby commented 7 years ago

That's what I thought too, but it didn't work:

% git checkout -b bsipocz-update-helpers-v2.0.1 master
% git pull https://github.com/bsipocz/specsim.git update-helpers-v2.0.1
...minor edits & commits...
% git remote add bsipocz git@github.com:bsipocz/specsim.git
% git push --set-upstream bsipocz bsipocz-update-helpers-v2.0.1
...
To github.com:bsipocz/specsim.git
 ! [remote rejected] bsipocz-update-helpers-v2.0.1 -> bsipocz-update-helpers-v2.0.1 (permission denied)
error: failed to push some refs to 'git@github.com:bsipocz/specsim.git'
bsipocz commented 7 years ago

ah, it doesn't work over https, you need to add the remote with with ssh: git@github.com:bsipocz/specsim.git

dkirkby commented 7 years ago

I did add the remote with ssh:

git remote add bsipocz git@github.com:bsipocz/specsim.git

However, I originally pulled using http (since I just copied the github cmd-line instructions):

git pull https://github.com/bsipocz/specsim.git update-helpers-v2.0.1

Perhaps that's the problem?

bsipocz commented 7 years ago

oh, sorry haven't read the previous careful enough. You won't be able to push a new branch to someone else's fork, and since the name of your branch and mine is different, you have to specify the target as well.

So: git push bsipocz bsipocz-update-helpers-v2.0.1:update-helpers-v2.0.1 should have worked. Or what I usually do is when just want to push the current branch I'm locally at git push bsipocz HEAD:update-helpers-v2.0.1

Since you don't plan to reuse these branches, the --set-upstream can be omitted.

dkirkby commented 7 years ago

Thanks for your help @bsipocz!