当前位置:网站首页>Openharmony get the source code
Openharmony get the source code
2022-04-23 22:02:00 【Know what you know and slowly understand what you don't know】
Established before Remote-SSH after , We can do it in windows Command operation under the terminal
The source code is obtained through repo Add some https By
1. install repo
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo
After copying, say that the permission is not enough

Take other ways Download the file to the current path

Prompt not installed curl , We need to install curl
sudo apt-get install curl
After the installation is completed, enter the previous command
Once the download is complete , adopt cat View the pulled repo Content
cat repo
If it is empty after input , Let's copy the address of the web page , Open it in a browser
I found that this is a script file

2. install vim
sudo apt-get install vim
adopt vim Get into repo
vim repo
When you come in, you will find a blank There is INSERT
Put all the script content in the browser just now Ctrl+A Copy all Paste the vim in
After editing Press the top left corner esc Exit edit status
Press down shigt+ The colon Input wq Save and exit
Next, continue take repo File copy to /usr/local Under the table of contents
sudo mv repo /usr/local/bin/
After copying , Need to give repo File add executable rights
sudo chmod a+x /usr/local/bin/repo
Add after completion You can use the following command to detect
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
In this way, it is finished
【 If you are like this 】

Yes, the current system environment does not pip perhaps pip3
You can install it pip3
sudo apt install python3-pip
You can query through instructions
pip3 --version
Upgrade through instructions
python3 -m pip install --upgrade pip
Then try the above command again
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
This is the finished
【 Some people can skip this one ...】
3. install git
sudo apt-get install git
I'm here git It's installed
install git-lfs
sudo apt-get install git-lfs
Set it up git Used to pull the following codes
openharmony Use this link to register gitee Account and email
Enter the user name at the terminal mailbox Configuration save verification
git config --global user.name"yourname"
git config --global user.email"your-email-address"
git config --global credential.helper store
Create a openharmony The catalog of
mkdir OpenHarmony_master
adopt cd Enter the directory
4. Download the source code
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
repo forall -c 'git lfs pull'
After the first step, the information will report an error Say no python3 Environment
We need a soft link
which python3 In the query system python3 The path of
Through soft links python3 Set to python
sudo ln -s /usr/bin/python3 /usr/bin/python
( The front is the source file path , Followed by the target file path )
After setting, query through the command python Version of
python --version
python3 --version

Then execute the file installation
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
There may be an error , According to the following situation
Question 1
sudo vim /usr/local/bin/repo
find import sys Add the following code
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
shigt+ The colon Input wq preservation sign out
Again using repo The order of
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify

The color that appears is to let us confirm repo The default functions , such as diff、repo stadus
The displayed file displays different states of the file through different colors
Synchronization code
repo sync -c
next step
repo forall -c 'git lfs pull'
版权声明
本文为[Know what you know and slowly understand what you don't know]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204200609332325.html
边栏推荐
猜你喜欢
随机推荐
延时消息常见实现方案
C reads excel specific data into specific columns of DataGridView
C winfrom DataGridView click on the column header can not automatically sort the problem
consul 关闭健康监控检查
Sklearn function: Train_ Test_ Split (split training set and test set)
2022 - 04 - 24 Daily: Current Progress and Open Challenges of Applied Deep Learning in Biological Sciences
OpenFeign的细节展示
在线时序流程图制作工具
Hystrix简介和服务端熔断的实现
资本追逐Near生态
RestTemplate 服务调用
Keras. Layers introduction to various layers
Hystrix components
Tsinghua University | webface260m: benchmark for million level deep face recognition (tpami2022)
Ribbon负载均衡策略
Ribbon组件负载均衡调用和使用
[leetcode refers to the maximum profit of offer 63. Stock (medium)]
Database Experiment 2 data query
DW basic tutorial (I)
Common implementation schemes of delay message
![[leetcode sword finger offer 28. Symmetric binary tree (simple)]](/img/bc/1f0c9e70470c7d60f821a4ecc2271f.png)







