Skip to main content

import github repo to gitee, then clone to local

Project description


从github导入仓库到gitee 解决github下载速度慢的问题 由于码云不提供导入的api,只能JS逆向码云登陆,导入仓库


pip install git2gitee


# git2gitee -u {gitee_username} -k {gitee_password} github_repo_url
git2gitee -u mikele -k password



python 使用公钥加密的方法, 使用pycryptodome

# git2gitee/
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 =
    cipher = b64encode(encryptor.encrypt(password.encode('utf-8')))
    return cipher.decode('utf-8')

解决csrf-token 的问题

import re

result ='<meta content="(.*?)" name="csrf-token"', response.text)
token =

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git2gitee-0.9.6.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

git2gitee-0.9.6-py3.6.egg (20.1 kB view hashes)

Uploaded 3 6

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page