I'm having trouble using curl to create a repo on my GitHub.com account (no ssh).
I created a basic static local site using Jekyll , which I want to click on the GitHub.com repository (I want to host the site on <username>.imtqy.com and, according to the instructions on the GitHub pages, the repo should have the same name as the folder containing the local site.
I have two-factor authentication for logging in to GitHub, so following this message , I pass the OTP / token (generated by the Application Settings in the request header using the -H "X-GitHub-OTP":<token> option -H "X-GitHub-OTP":<token> . I can log in the system (this post previously raised the question that the Github login is not working, which was caused by not closing the "X-GitHub-OTP" correctly), but now the login works, but now I get the answer with code 400. Here is the command curl I use:
$username="<username>" $reponame="$username.imtqy.com" $token="<token>" $apidom="https://api.github.com/user/repos/" $curl -u $username -H '{"X-GitHub-OTPOTP":$token}' -d '{"name":$reponame,"description":$repodesc}' $apidom
and reply message:
<p><strong>We didn't receive a proper request from your browser.</strong></p> <p>Sorry about that. Please try refreshing and contact us if the problem persists.</p> <div id="suggestions"> <a href="https://github.com/contact">Contact Support</a> — <a href="https://status.github.com">GitHub Status</a> — <a href="https://twitter.com/githubstatus">@githubstatus</a> </div>
user997225
source share