快速配置linux远程开发-go语言

1.go安装包安装

2.go env 配置

go env -w GO111MODULE=on

go env -w GOPROXY=xx

go env -w GOSUMDB=off

go env -w GOPRIVATE=xx

3.复制linux公钥到gitlab中,用于通过ssh免密拉取gitlab项目

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

4.设置win免密登录linux

  • 追加win的ssh公钥到linux中
  • 查看公钥内容 C:\Users\你的用户名\.ssh\id_rsa.pub
  • 复制公钥内容到剪贴板
  • cat >> ~/.ssh/authorized_keys

5.配置https免密拉取gitlab项目

git config --global user.name "yunis.yao" # 设置全局用户名

git config --global user.email "yunis.yao@aishu.cn" # 设置全局邮箱

git config --global credential.helper netrc

vi ~/.netrc

machine gitlab.com

login [email protected]

password your_access_token #gitlab 令牌

相关推荐
ss27314 分钟前
基于Springboot + vue + 爬虫实现的高考志愿智能推荐系统
spring boot·后端·高考
CodeWithMe32 分钟前
【C++】线程池
开发语言·c++
专注API从业者1 小时前
《Go 语言高并发爬虫开发:淘宝商品 API 实时采集与 ETL 数据处理管道》
开发语言·后端·爬虫·golang
Asthenia04121 小时前
Netty writeAndFlush与Pipeline深入分析
后端
欧先生^_^2 小时前
Scala语法基础
开发语言·后端·scala
hu_yuchen2 小时前
C++:BST、AVL、红黑树
开发语言·c++
炯哈哈2 小时前
【上位机——MFC】视图
开发语言·c++·mfc·上位机
我也不曾来过12 小时前
继承(c++版 非常详细版)
开发语言·c++
purrrew2 小时前
【JAVA ee初阶】多线程(3)
java·开发语言
GetcharZp3 小时前
xterm.js 终端神器到底有多强?用了才知道!
前端·后端·go