最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Win中VMWare中macOS下载自动化测试项目源码和提交更新

macOS crifan 309浏览 0评论
折腾:
【已解决】Win中VMWare中macOS初始化开发环境
期间,已经给macOS安装了基本的开发工具和环境。
接着就是去下载源码下来。再去调试和运行。
项目源码是放在gitlab的
先找到git地址,以及确保是此处公司内网,才能访问到。
此处仓库地址是:
去下载试试
crifanli@crifanlideMac  ~/dev/DevRoot  git clone http://xxx:12310/data/data_xxx/appcrawler.git
Cloning into 'appcrawler'...
卡死了?
好像应该去掉git的GitHub仓库的代理?
好像不需要,因为地址不匹配。
报错了:
fatal: unable to access 'http://xxx:12310/data/data_xxx/appcrawler.git/': Failed to connect to xxx port 12310: Connection refused
没连上。
那去ping试试
✘ crifanli@crifanlideMac  ~/dev/DevRoot  ping xxx
PING xxx (192.168.0.2): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
果然连不上
去试试此处host的win中
C:\Windows\system32>ping xxx

正在 Ping xxx [192.168.0.2] 具有 32 字节的数据:
请求超时。
也连不上。
那去找找情况
去访问
也打不开:
此处确保WiFi是正常的:
因为之前另外一个公司的Mac也是连接的这个WiFi,没问题才对。
不过好像记得另外的Mac中是DNS配置中加了IP映射的?
换到Mac中:
去确认看看
  master  ping xxx
PING xxx (192.168.0.2): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
此处mac中也无法访问到?
去看看hosts配置
 cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost
192.168.7.109    yyy.dev.xxx.corp.com
此处没有IP映射啊
那去Mac中打开网址试试
也是打不开
看来是:
要换到公司内网WiFi,才能打开?
竟然还打不开?
试了试本地的git代码去push,等了会,也是同样报错:
Git: fatal: unable to access 'http://xxx:12310/data/data_xxx/appcrawler.git/': Failed to connect to xxx port 12310: Operation timed out
-》那说明,此刻:代码无法下载
需要:
找人解决此问题:确保服务器没问题
或者换个时间再试
那明天再试。
看来gitlab可以访问了。
那再去试试
C:\Users\xxx>ping xxx


正在 Ping xxx [192.168.0.2] 具有 32 字节的数据:
来自 192.168.0.2 的回复: 字节=32 时间=6ms TTL=61
来自 192.168.0.2 的回复: 字节=32 时间=6ms TTL=61
也是可以 ping通的
直接去macOS中下载
可以正常下载了。
输入用户名和密码
  • 用户名是:xxx
  • 密码是:Gitlab 中的 Personal Access Tokens
即可正常下载代码
crifanli@crifanlideMac  ~/dev/DevRoot  git clone http://xxx:12310/data/data_xxx/appcrawler.git
Cloning into 'appcrawler'...
Username for 'http://xxx:12310': xxx
Password for 'http://xxx@xxx:12310':
remote: Enumerating objects: 184, done.
remote: Counting objects: 100% (184/184), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 2258 (delta 128), reused 137 (delta 94)
Receiving objects: 100% (2258/2258), 1.80 MiB | 1.32 MiB/s, done.
Resolving deltas: 100% (1389/1389), done.
至此,下载代码OK。
【总结】
此处Win中VMWare中macOS,想要下载项目代码
先确保公司内网的gitlab能正常访问,然后再去
git clone http://xxx:12310/data/data_xxx/appcrawler.git
输入
用户名:xxx
密码:gitlab中之前设置的Personal Access Token
即可。
【后记】
之后,再去提交更新后的代码,确保push没问题:
crifanli@crifanlideMac  ~/dev/DevRoot/appcrawler   master ✚  git commit -m "1. update python lib"                                      
[master 0409060] 1. update python lib
Committer: crifanli <crifanli@crifanlideMac.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:


    git commit --amend --reset-author


2 files changed, 3 insertions(+), 2 deletions(-)
commit时提示要去加上用户名和邮箱
所以去设置
crifanli@crifanlideMac  ~/dev/DevRoot/appcrawler   master  git config --global user.name "crifanli"                                  
crifanli@crifanlideMac  ~/dev/DevRoot/appcrawler   master  git config --global user.email xxx@xxx
crifanli@crifanlideMac  ~/dev/DevRoot/appcrawler   master  git commit --amend --reset-author
然后进入vi的编辑页面,输入:wq保存退出,然后即可成功提交:
[master 9120c3c] 1. update python lib
2 files changed, 3 insertions(+), 2 deletions(-)
然后再去push:
crifanli@crifanlideMac  ~/dev/DevRoot/appcrawler   master  git push                         
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 3 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 387 bytes | 387.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0)
To http://xxx:12310/data/data_xxx/appcrawler.git
   21c7efb..9120c3c  master -> master
即可。

转载请注明:在路上 » 【已解决】Win中VMWare中macOS下载自动化测试项目源码和提交更新

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.188 seconds, using 23.41MB memory