0

Trying to creae a remote repo regular github account with below command

$ curl -u 'USER':'TOKEN' https://api.github.com/user/repos -d '{"name":"REPO"}'

this works fine.

If my github account is in government org. say https://github.xyz.gov then

$ curl -u 'USER':'TOKEN' https://api.github.xyz.gov/user/repos -d '{"name":"REPO"}'

gives below error,

Could not resolve host: api.github.xyz.gov

Trying to create at user level, I also need to create repo on Organization level apart from user level later. What is issue here.

torek
  • 448,244
  • 59
  • 642
  • 775
Krishna
  • 501
  • 1
  • 8
  • 17
  • This has nothing to do with Git, and probably doesn't belong on StackOverflow at all but rather on SuperUser or similar. – torek Apr 29 '22 at 07:27
  • Where is official github document link mention for curl -u 'USER':'TOKEN' https://api.github.com/user/repos -d '{"name":"REPO"}' – Krishna Apr 29 '22 at 15:36
  • GitHub documentation will only say what you must supply in your HTML; curl documentation will tell you how curl *can* supply that, provided that it can. But your main issue here is that `api.github.xyz.gov` is not resolving as a host name, presumably because it is not actually a host name, or (if it *is* a host name) because of some name-resolver issue. – torek Apr 29 '22 at 18:30

0 Answers0