Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./add_mirror.sh error #127

Open
Jiang-boyang opened this issue May 18, 2020 · 4 comments
Open

./add_mirror.sh error #127

Jiang-boyang opened this issue May 18, 2020 · 4 comments

Comments

@Jiang-boyang
Copy link

Resolving gitlab remote.
Traceback (most recent call last):
File "lib/manage_gitlab_project.py", line 10, in
import gitlab
File "/usr/lib/python2.7/site-packages/gitlab/init.py", line 612
) from e
^
SyntaxError: invalid syntax
There was an unknown issue with manage_gitlab_project.py

@flylan
Copy link

flylan commented Jun 15, 2020

same error

@flylan
Copy link

flylan commented Jun 15, 2020

Resolving gitlab remote.
Traceback (most recent call last):
File "lib/manage_gitlab_project.py", line 10, in
import gitlab
File "/usr/lib/python2.7/site-packages/gitlab/init.py", line 613
) from e
^
SyntaxError: invalid syntax

@ydewinte
Copy link

ydewinte commented Mar 22, 2021

I found out what the issue was.
By checking when the docs were written I found out that they were written at the time python-gitlab was on v1.x.
By doing the following:

pip uninstall python-gitlab
pip install python-gitlab==1.15.

It started working:

[gitmirror@hylek gitlab-mirrors]$ ./add_mirror.sh --git --project-name github-gitlab-mirrors --mirror https://github.com/samrocketman/gitlab-mirrors.git
Resolving gitlab remote.
Creating new project github-gitlab-mirrors
Creating mirror from https://github.com/samrocketman/gitlab-mirrors.git
Cloning into bare repository 'github-gitlab-mirrors'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 1292 (delta 1), reused 5 (delta 0), pack-reused 1283
Receiving objects: 100% (1292/1292), 245.63 KiB | 0 bytes/s, done.
Resolving deltas: 100% (678/678), done.
Adding gitlab remote to project.
Checking the mirror into gitlab.
The authenticity of host 'nasgitlab.inet.telenet.be (192.168.252.1)' can't be established.
ECDSA key fingerprint is SHA256:yvOBZfrOsyvyHoH2ukPbeLA+Kruke6R6pvrvary87p4.
ECDSA key fingerprint is MD5:4d:ff:5d:de:d2:f4:ae:2d:c9:95:a1:96:b4:6e:fd:16.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'nasgitlab.inet.telenet.be,192.168.252.1' (ECDSA) to the list of known hosts.
Counting objects: 1201, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (517/517), done.
Writing objects: 100% (1201/1201), 222.34 KiB | 0 bytes/s, done.
Total 1201 (delta 632), reused 1201 (delta 632)
remote: Resolving deltas: 100% (632/632), done.
To [email protected]:Mirrors/github-gitlab-mirrors.git
 * [new branch]      development -> development
 * [new branch]      main -> main
 * [new tag]         v0.1 -> v0.1
 * [new tag]         v0.1.1 -> v0.1.1
 * [new tag]         v0.2 -> v0.2
 * [new tag]         v0.2.1 -> v0.2.1
 * [new tag]         v0.2.10 -> v0.2.10
 * [new tag]         v0.2.2 -> v0.2.2
 * [new tag]         v0.2.3 -> v0.2.3
 * [new tag]         v0.2.4 -> v0.2.4
 * [new tag]         v0.2.5 -> v0.2.5
 * [new tag]         v0.2.6 -> v0.2.6
 * [new tag]         v0.2.7 -> v0.2.7
 * [new tag]         v0.2.8 -> v0.2.8
 * [new tag]         v0.2.9 -> v0.2.9
 * [new tag]         v0.3.0 -> v0.3.0
 * [new tag]         v0.3.1 -> v0.3.1
 * [new tag]         v0.4.0 -> v0.4.0
 * [new tag]         v0.4.1 -> v0.4.1
 * [new tag]         v0.4.2 -> v0.4.2
 * [new tag]         v0.4.3 -> v0.4.3
 * [new tag]         v0.4.4 -> v0.4.4
 * [new tag]         v0.4.5 -> v0.4.5
 * [new tag]         v0.4.6 -> v0.4.6
 * [new tag]         v0.4.7 -> v0.4.7
 * [new tag]         v0.4.8 -> v0.4.8
 * [new tag]         v0.4.9 -> v0.4.9
 * [new tag]         v0.5.0 -> v0.5.0
 * [new tag]         v0.5.1 -> v0.5.1
 * [new tag]         v0.5.2 -> v0.5.2
 * [new tag]         v0.5.3 -> v0.5.3
 * [new tag]         v0.6.0 -> v0.6.0
 * [new tag]         v0.6.1 -> v0.6.1
All done!

@samrocketman
Copy link
Owner

samrocketman commented Aug 1, 2021

@ydewinte thanks for the solution for others.

I think I will touch up this project and simplify it a bit. I'll pip freeze dependencies and update documentation to recommend use of virtualenv.

For now, this issue will remain open and I will close it when there's a fix out for users which don't involve running into errors out of the box.

As a side note; what is the oldest version of GitLab which should be supported currently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants