You get this error because your socket did not connect successfully, and the reason why is because the name of the server here is github.com, http or https are just the protocol, you need to use "/sockopen gitpush github.com 80" at the very least.
Inside the on sockopen event, you can use $sockerr to know if the connection was successful.
Inside the on sockread event, you're reading into a global variable, you should probably make that variable local by using "var %gitpush" before /sockread %gitpush, and if you're looking to read line by line, you should check that data was read by checking $sockbr. if $sockbr is 0, no data was read and you should stop doing anything with a /return or something.