git2gitee
从github导入仓库到gitee 解决github下载速度慢的问题 由于码云不提供导入的api,只能JS逆向码云登陆,导入仓库
安装
pip install git2gitee
使用
# git2gitee -u {gitee_username} -k {gitee_password} github_repo_url
git2gitee -u mikele -k password https://github.com/toyourheart163/git2gitee
加密方法
进入登陆页面时会加载一个encrypt开头的js文件
python 使用公钥加密的方法, 使用pycryptodome
# git2gitee/util.py
from base64 import b64encode
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
def encrypt_pwd(password, public_key):
rsa_key = RSA.import_key(public_key)
encryptor = PKCS1_v1_5.new(rsa_key)
cipher = b64encode(encryptor.encrypt(password.encode('utf-8')))
return cipher.decode('utf-8')
解决csrf-token 的问题
import re
result = re.search('<meta content="(.*?)" name="csrf-token"', response.text)
token = result.group(1)
Metadata
Release files for git2gitee 0.9.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| git2gitee-0.9.6.tar.gz | 5.3 kB | Without provenance | Details for git2gitee-0.9.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| git2gitee-0.9.6-py3.6.egg | Legacy Egg format | - | - | Details for git2gitee-0.9.6-py3.6.egg |
Total release size: 25.4 kB
Release files / git2gitee-0.9.6.tar.gz
| Download URL | git2gitee-0.9.6.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
231b3df793f0d4e410e5722a9037db9f3b654151d109afc4fe637c88d53c1be0
|
|
BLAKE2b-256 checksum How to use checksums |
dded2023fdd786db213fd80f4460e130d36cebb2864077dcb43a38071d98f027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Release files / git2gitee-0.9.6-py3.6.egg
| Download URL | git2gitee-0.9.6-py3.6.egg |
|---|---|
| Size | 20.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
3f569e755395a7edf2a3c80f8aa57619f7a023af2093ca4fb90f48dcb7b790a4
|
|
BLAKE2b-256 checksum How to use checksums |
f9bac65362c2b10d1c37a7d468dfc89180c947c09b5bb10eadd66ede50e83194
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for git2gitee 0.9.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.