diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-11 17:29:42 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-11 17:29:42 -0300 |
commit | c5e4e676e3b1dc5aa0b71fd9c026c0e172cda808 (patch) | |
tree | 4e2209baac5084d91dcee65fdc66449df6d09683 /lib | |
parent | ea5d43a3b8c01fb83d215a7eb15f246f26a34c64 (diff) | |
download | gitlab-ce-c5e4e676e3b1dc5aa0b71fd9c026c0e172cda808.tar.gz |
Fix token interpolation when setting the Github remote
Diffstat (limited to 'lib')
-rw-r--r-- | lib/github/import.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb index 06beb607a3e..452aebc66cb 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -1,4 +1,5 @@ require_relative 'error' + module Github class Import include Gitlab::ShellAdapter @@ -79,7 +80,7 @@ module Github def fetch_repository begin project.create_repository unless project.repository.exists? - project.repository.add_remote('github', "https://{options.fetch(:token)}@github.com/#{repo}.git") + project.repository.add_remote('github', "https://#{options.fetch(:token)}@github.com/#{repo}.git") project.repository.set_remote_as_mirror('github') project.repository.fetch_remote('github', forced: true) rescue Gitlab::Shell::Error => e |