Skip to content

Commit

Permalink
Fix a bug: can not push to a public repo
Browse files Browse the repository at this point in the history
This solved #82.
  • Loading branch information
Kaiser-Yang committed Oct 25, 2024
1 parent 69c3dff commit 621bad8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions script/deploy_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ def install_redis():

def deploy_on_ubuntu(config):
assert(config != None)
if os.path.exists(application_config_file_path):
res = os.system(f'rm -rf {application_config_file_path}')
command_checker(res, f"Failed to remove {application_config_file_path}")
if config.serviceType != 'systemd':
essential_packages.remove('systemd')
apt_install_package(parse_iterable_into_str(essential_packages))
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/edu/cmipt/gcs/util/GitoliteUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ public static synchronized boolean initUserConfig(Long userId) {
@%d_ssh_key =
repo @%d_private_repo
RW+ = @%d_ssh_key
repo @%d_public_repo
RW+ = @%d_ssh_key
"""
.formatted(userId, userId, userId, userId, userId);
.formatted(userId, userId, userId, userId, userId, userId, userId);
Files.writeString(userConfPath, content);
List<String> lines = Files.readAllLines(Paths.get(GitConstant.GITOLITE_CONF_FILE_PATH));
for (int i = 0; i < lines.size(); i++) {
Expand Down

0 comments on commit 621bad8

Please sign in to comment.