添加权限

dev_partners
jingquan huang 6 years ago
parent c71677710d
commit 5950eb66d6

@ -153,8 +153,12 @@ class WelcomeController < ApplicationController
shixun.update_column(:git_url, g.project(shixun.gpid).path_with_namespace) shixun.update_column(:git_url, g.project(shixun.gpid).path_with_namespace)
local_git_path = local_shixun.local_giturl.split('/').last if local_shixun.local_giturl.present? local_git_path = local_shixun.local_giturl.split('/').last if local_shixun.local_giturl.present?
new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last
# 如果有目录才执行
if system("cd tmp/repositories/#{local_git_path}")
system("cd tmp/repositories/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl}; system("cd tmp/repositories/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl};
git add .;git commit -m '..';git push origin master") git add .;git commit -m '..';git push origin master")
end
# http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch) # http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch)

Loading…
Cancel
Save