Hi Jens

Out of curiosity I also tried setting up a new project with repository.
Sadly I ran into the same problem; I cannot figure out how to create a
repo/default branch in a new project. Tried specifying all kinds of things
for the "ref" parameter including null, "" (blank string) and master but
only getting a 404 error. Trying to list branches on the newly created
project also produces a 404. This all makes sense if you consider the repo
has not yet been init'd - but how to create it?

Reading Gitlab sources didn't reveal any clues, either we are missing
something or there is a gap in functionality (I suspect the former).

Regards
Tom



On 12 January 2015 at 11:08, Jens Søgaard <[email protected]> wrote:

> Hi,
>
> Yes, but I can't figure out how I generate that SHA - remember it's a
> blank repo that has just been created so I need a "commit SHA", but how do
> I get that?
>
>
> On Monday, January 12, 2015 at 10:05:01 AM UTC+1, Achilleas Pipis wrote:
>>
>> On 01/12/2015 10:12 AM, Jens Søgaard wrote:
>> > The API documents a "create branch" method that takes 3 params:
>> > project_id, branch_name and ref - however I can not figure out what to
>> > do with ref?
>> > http://doc.gitlab.com/ce/api/branches.html
>> >
>> > I can not figure out what to provide as "ref" - no matter what I do
>> > (tried empty string) I get:
>> >
>> > /ErrorException' with message 'Invalid reference name'/
>> > *
>> > *
>> > *Any ideas as to how I can provide ref? Or am I missing something in
>> the
>> > way I go about things?*
>> > *
>> > *
>> > My goal is to create a repository from the API and add some files to
>> it.
>> > But since the project does not by default have a branch I want to
>> create
>> > it before adding files.
>> >
>> >
>>
>> As the documentation suggests:
>>
>> ref (required) - Create branch from commit SHA or existing branch
>>
>> So, you have to provide either a commit SHA or a branch name from which
>> the new branch will be created.
>>
>> --
>> GPG : 0x3A7DDABC985EDC6E
>> Blog: http://axilleas.me
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "GitLab" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gitlabhq/19b2d562-a5ff-4ce9-9750-0754841ccd18%40googlegroups.com
> <https://groups.google.com/d/msgid/gitlabhq/19b2d562-a5ff-4ce9-9750-0754841ccd18%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Tom Bamford

*@Planet*
ATPLANET (Pty) Ltd
atpla.net

Cell: +27 (0)79-095-7112
Fax: +27 (0)86-599-1310

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/CAAnNz0PLh2dbabNbg-x4%2B83GLF_GbKSh1jGOGD%2BVnCWRNsDnTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to