Git Product home page Git Product logo

gitlab_to_gitea's People

Contributors

99rgosse avatar frankkkkk avatar h44z avatar haliliceylan avatar libklein avatar michalfapso avatar rtm516 avatar trailfog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitlab_to_gitea's Issues

Well done!

Thanks for this great script!

I used it to migrate my Gitlab 15.11.9 instance to Gitea 1.20.5.

FYI:
Since I have a reverse proxy which adds SSl, I got the following warning which in the end leads to failure:

migrate.py:54: UserWarning: The base URL in the server response differs from the user-provided base URL (https://git.home.***.ch -> http://gitlab-15.11).
This is usually caused by a misconfigured base URL on your side or a misconfigured external_url on the server side, and can lead to broken pagination and unexpected behavior. If this is intentional, use `keep_base_url=True` when initializing the Gitlab instance to keep the user-provided base URL. (python-gitlab: ***/gitlab/client.py:603)
  gl.auth()

Adding keep_base_url=True to gl = gitlab.Gitlab() solved the issue and the migration was successful.

SyntaxError: invalid syntax

Hi, I'm not familiar with python, so I can't figure it out. Could you help, what I can miss? Installation of requirements passed fine, but running the script isn't.

# python3 -V
Python 3.5.3

# python3 migrate.py
  File "migrate.py", line 69
    label_response: requests.Response = gitea_api.get("/repos/" + owner + "/" + repo + "/labels")
                  ^
SyntaxError: invalid syntax

Importing causes Gitea "view file" to throw 404 error

Hello,

Gitea 1.12.4 importing GitLab 13.3.5, Python 3.8.

I've imported ~ 120 repositories across five organizations. All worked really well. Note I don't use issues, CI/CD, etc in GitLab.

However, in Gitea when I compare commits and click on "View File" I get a 404 error. At first I thought this was a proxy problem and fought it via Nginx for quite some time. Eventually after no relief, I went back and did a few manual imports through the Gitea front end (menu / new migration). The same project imported that way does not give the 404 error when attempting to view the same file; all projects I imported using this method come in without the error, while 100% of the script imports have the problem.

Is there anything I can do to assist or troubleshoot?

Best,
--J

error docker execution

Hi,
i try to migrate some all my project from gitlab to gitea because gitlab problem on write new repo. After create all group/society i receive this error.

sync_1 | The above exception was the direct cause of the following exception:
sync_1 |
sync_1 | Traceback (most recent call last):
sync_1 | File "migrate.py", line 650, in
sync_1 | main()
sync_1 | File "migrate.py", line 55, in main
sync_1 | import_projects(gl, gt)
sync_1 | File "migrate.py", line 556, in import_projects
sync_1 | projects: gitlab.v4.objects.Project = gitlab_api.projects.list(all=True)
sync_1 | File "/usr/local/lib/python3.6/site-packages/gitlab/exceptions.py", line 306, in wrapped_f
sync_1 | raise error(e.error_message, e.response_code, e.response_body) from e
sync_1 | gitlab.exceptions.GitlabListError: 500: 500 Internal Server Error
gitlab_to_gitea_sync_1 exited with code 1

any sugest?

thank you

Add support for migrating into a specific organisation

Hi,

it seems this script only does a full migration. It would be nice if a target organisation could be specified into which the repositories are migrated. Similarly, it would be great if as source URL a GitLab group could be given.

Unexpected keyword argument 'json'

Hi,

maybe I need a little bit more steps.
I tried your script with python 3.7.4
and installed pygitea and python-gitlab via pip.
I configured the user source with ldap in gitea and tried
to import everything else with the script.
I get this bug:

No public keys for user feng, importing!
Traceback (most recent call last):
  File "./migrate.py", line 619, in <module>
    main()
  File "./migrate.py", line 56, in main
    import_users_groups(gl, gt)
  File "./migrate.py", line 535, in import_users_groups
    _import_users(gitea_api, users, notify)
  File "./migrate.py", line 462, in _import_users
    _import_user_keys(gitea_api, keys, user)
  File "./migrate.py", line 471, in _import_user_keys
    "title": key.title,
TypeError: post() got an unexpected keyword argument 'json'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.