windows环境下github + beego尝试

先安装本地配置GO环境,配置GitHub环境,在github上创建帐户


打开github shell,执行:go get github.com/beego/bee


报错:

# cd .; git clonehttps://github.com/beego/bee e:\go\src\github.com\beego\bee

Cloning into'e:\go\src\github.com\beego\bee'...

fatal: unable to access 'https://github.com/beego/bee/':Could not resolve host:

 github.com

package github.com/beego/bee: exit status128

解决方法:

执行: gitconfig --global http.sslVerify false

然后再执行:go get github.com/beego/bee

通过

再执行:E:\Go\src\github.com> go getgithub.com/astaxie/beego

注意:这里必须用GO命令去下载beego的程序,这样下载的程序才比较全,我开始用githu客户端下载,结果这个程序是运行不了的。

这一步执行完后的目录结构如下:


创建项目:bee new mytest

注意执行的目录:要到GO的SRC目录下执行,执行结果如下:


然后进入mytest目录下,执行bee run mytest

原来用github直接下载的beego运行时报错,有些包找不到

后来改用GO命令下载beego就没问题了。

运行成功!


注意几点:

1、在github的shell下执行命令,要不然会报找不到git命令的错误

2、用go命令下载beego程序,要不然包不全

3、要到相应的目录下执行程序,要不然会报错误Fail to watch directory[GetFileAttributes:The system cannotfind the file specified.]

4、要注意git clone SSL error解决:gitconfig --global http.sslVerify false

5、上述过程是我初步尝试结果,应该还有更好的办法,大家共同探索。


你可能感兴趣的:(技术文章)