plu / Pithub

Perl Github v3 API

Home Page:http://metacpan.org/module/Pithub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot run the example script gitdata_commit.pl

loveky opened this issue · comments

when run this script, I got "Could not create blob at ./gitdata_commit.pl line 24." Anybody can run this script without problem? or anybody know what should I configure to get this work?

It will not work for you since it is using my repo Pithub, you can see that in following lines:

my $git = Pithub::GitData->new(
    repo  => 'Pithub',
    token => $ENV{GITHUB_TOKEN},
    user  => 'plu',
);

You can change the repo, token and user there. If you set it to a repository where you have write access (using the OAuth token), the example should work. But it won't make much sense, since the file will commit itself there :). It's more a demonstration on how to use the git data commit API.

Well, When I run this script I did changed the repo, token, user to appropriate values. But I'm still getting that error.

Now, I have figure out where goes wrong. The problem occurs on the token part. I set up the OAuth token correctly and the script works now.

Thank you Johannes. I really appreciate your great work and your module did helps me a lot.

Cool, you're welcome! :)

I guess I could close this issue then?

yes, you can close it now. :)

thanks :)