In windows the correct command is: curl "https://raw.githubusercontent.com/gin-gonic/examples/master/basic/main.go" -O main.go instead of curl "https://raw.githubusercontent.com/gin-gonic/examples/master/basic/main.go" > main.go