neuropoly/intranet.neuro.polymtl.ca

git-annex upload new repository

jcohenadad opened this issue · 6 comments

Following this recipe:

First issue

image

I observe this error:

julien-macbook:~/data.neuro/canproco $ git push origin
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master

Should we then replace in the documentation

git push origin

by

git push --set-upstream origin master

?

Second issue:

julien-macbook:~/data.neuro/canproco $     git push --set-upstream origin master
FATAL: W any canproco jcohen DENIED by fallthru
(or you mis-spelled the reponame)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It looks like I am an admin?

julien-macbook:~/data.neuro/canproco $ ssh git@data keys list
Hello jcohen, you are an admin.

Note that I made a mistake and I originally wrote:

git remote add origin git@data.neuro.polymtl.ca:canproco

But then, I did what I should have done:

git remote add origin git@data.neuro.polymtl.ca:datasets/canproco

And it gave me:

fatal: remote origin already exists.

What's the output of git remote -v? It probably lists git@data.neuro.polymtl.ca:canproco (without datasets/) as a configured remote (even though it doesn't exist on the server). If that's the case, you should try this:

git remote rm origin
git remote add origin git@data.neuro.polymtl.ca:datasets/canproco

And yes, adding --set-upstream to the git push instructions sounds like a great idea; it's always annoying that it's not the default.

kousu commented

Yes, --set-upstream is in line with what GitHub recommends for empty repos:

git remote add origin git@github.com:kousu/test1.git
git branch -M master
git push -u origin master

Done in 743cd11

What's the output of git remote -v? It probably lists git@data.neuro.polymtl.ca:canproco (without datasets/) as a configured remote (even though it doesn't exist on the server). If that's the case, you should try this:

julien-macbook:~/data.neuro/canproco $ git remote -v
origin	git@data.neuro.polymtl.ca:canproco (fetch)
origin	git@data.neuro.polymtl.ca:canproco (push)

the tips in #73 (comment) seems to be working! thank you @mguaypaq